Commit 63cbc93b authored by michael's avatar michael

only add prefix after \n


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@2471 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent cbeb3027
......@@ -780,10 +780,15 @@ static int av_log_level = AV_LOG_DEBUG;
static void av_log_default_callback(AVCodecContext* avctx, int level, const char* fmt, va_list vl)
{
static int print_prefix=1;
if(level>av_log_level)
return;
if(avctx)
if(avctx && print_prefix)
fprintf(stderr, "[%s @ %p]", avctx->codec->name, avctx);
print_prefix= (int)strstr(fmt, "\n");
vfprintf(stderr, fmt, vl);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment