Skip to content

Commit

Permalink
Bug 1347352 - Make FFmpeg LogLevel controlled by PDM logging level. r…
Browse files Browse the repository at this point in the history
…=jwwang

MozReview-Commit-ID: 9yVNXvIhnUP
  • Loading branch information
Jean-Yves Avenard committed Oct 29, 2017
1 parent b123e54 commit 187079c
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions dom/media/platforms/ffmpeg/FFmpegLibWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "prlink.h"

#define AV_LOG_DEBUG 48
#define AV_LOG_INFO 32

namespace mozilla
{
Expand Down Expand Up @@ -141,10 +142,13 @@ FFmpegLibWrapper::Link()
#undef AV_FUNC_OPTION

avcodec_register_all();
#ifdef DEBUG
av_log_set_level(AV_LOG_DEBUG);
#endif

if (MOZ_LOG_TEST(sPDMLog, LogLevel::Debug)) {
av_log_set_level(AV_LOG_DEBUG);
} else if (MOZ_LOG_TEST(sPDMLog, LogLevel::Info)) {
av_log_set_level(AV_LOG_INFO);
} else {
av_log_set_level(0);
}
return LinkResult::Success;
}

Expand Down

0 comments on commit 187079c

Please sign in to comment.