mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-27 15:32:43 +02:00
fix input avlog thx DboxOldie
Origin commit data
------------------
Branch: master
Commit: c340015ab2
Author: max_10 <max_10@gmx.de>
Date: 2016-04-05 (Tue, 05 Apr 2016)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -20,7 +20,7 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define ENABLE_LOGGING 0
|
#define ENABLE_LOGGING 1
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@@ -378,8 +378,13 @@ bool Input::Init(const char *filename, std::string headers)
|
|||||||
abortPlayback = false;
|
abortPlayback = false;
|
||||||
av_lockmgr_register(lock_callback);
|
av_lockmgr_register(lock_callback);
|
||||||
#if ENABLE_LOGGING
|
#if ENABLE_LOGGING
|
||||||
|
av_log_set_flags(AV_LOG_SKIP_REPEATED);
|
||||||
av_log_set_level(AV_LOG_INFO);
|
av_log_set_level(AV_LOG_INFO);
|
||||||
av_log_set_callback(log_callback);
|
/* out commented here for using ffmpeg default: av_log_default_callback
|
||||||
|
because of better log level handling */
|
||||||
|
//av_log_set_callback(log_callback);
|
||||||
|
#else
|
||||||
|
av_log_set_level(AV_LOG_PANIC);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!filename) {
|
if (!filename) {
|
||||||
@@ -419,7 +424,13 @@ again:
|
|||||||
{
|
{
|
||||||
av_dict_set(&options, "headers", headers.c_str(), 0);
|
av_dict_set(&options, "headers", headers.c_str(), 0);
|
||||||
}
|
}
|
||||||
|
#if ENABLE_LOGGING
|
||||||
|
av_log_set_level(AV_LOG_DEBUG);
|
||||||
|
#endif
|
||||||
int err = avformat_open_input(&avfc, filename, NULL, &options);
|
int err = avformat_open_input(&avfc, filename, NULL, &options);
|
||||||
|
#if ENABLE_LOGGING
|
||||||
|
av_log_set_level(AV_LOG_INFO);
|
||||||
|
#endif
|
||||||
av_dict_free(&options);
|
av_dict_free(&options);
|
||||||
if (averror(err, avformat_open_input)) {
|
if (averror(err, avformat_open_input)) {
|
||||||
avformat_free_context(avfc);
|
avformat_free_context(avfc);
|
||||||
@@ -610,6 +621,8 @@ bool Input::Stop()
|
|||||||
while (hasPlayThreadStarted != 0)
|
while (hasPlayThreadStarted != 0)
|
||||||
usleep(100000);
|
usleep(100000);
|
||||||
|
|
||||||
|
av_log(NULL, AV_LOG_QUIET, "%s", "");
|
||||||
|
|
||||||
if (avfc) {
|
if (avfc) {
|
||||||
ScopedLock lock(mutex);
|
ScopedLock lock(mutex);
|
||||||
for (unsigned int i = 0; i < avfc->nb_streams; i++)
|
for (unsigned int i = 0; i < avfc->nb_streams; i++)
|
||||||
|
Reference in New Issue
Block a user