Skip to content
Snippets Groups Projects
Commit 89b9441a authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

only add prefix after \n

Originally committed as revision 2471 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 762357e6
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment