Skip to content

Commit

Permalink
imgcat: disable libav log messages
Browse files Browse the repository at this point in the history
  • Loading branch information
whatdoineed2do/Ray committed Nov 13, 2023
1 parent a92728d commit 54761ff
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/ImgAVFmtParser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,17 @@ extern "C" {

bool ImgAVFmtParser::_initd = false;

static void _avlog_callback_null(void *ptr, int level, const char *fmt, va_list vl)
{ }


ImgAVFmtParser::ImgAVFmtParser()
{
if (!ImgAVFmtParser::_initd) {
ImgAVFmtParser::_initd = true;

av_log_set_flags(AV_LOG_SKIP_REPEATED);
av_log_set_callback(_avlog_callback_null);
}
}

Expand Down

0 comments on commit 54761ff

Please sign in to comment.