From 509dba22647f49f43bcc761ca05c512478f2c8f3 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Thu, 2 Aug 2018 22:48:40 -0700 Subject: [PATCH] Enable ffmpeg logging during codec initialization --- app/streaming/video/ffmpeg.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/streaming/video/ffmpeg.cpp b/app/streaming/video/ffmpeg.cpp index 1e3ed032..6954dd02 100644 --- a/app/streaming/video/ffmpeg.cpp +++ b/app/streaming/video/ffmpeg.cpp @@ -167,6 +167,11 @@ bool FFmpegVideoDecoder::completeInitialization(AVCodec* decoder, int videoForma } } +#ifdef QT_DEBUG + // Restore default log level before streaming + av_log_set_level(AV_LOG_INFO); +#endif + return true; } @@ -205,6 +210,11 @@ bool FFmpegVideoDecoder::initialize( { AVCodec* decoder; +#ifdef QT_DEBUG + // Increase log level during initialization + av_log_set_level(AV_LOG_DEBUG); +#endif + if (videoFormat & VIDEO_FORMAT_MASK_H264) { decoder = avcodec_find_decoder(AV_CODEC_ID_H264); }