aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2003-11-03 13:58:26 +0000
committerMichael Niedermayer <michaelni@gmx.at>2003-11-03 13:58:26 +0000
commit89b9441abad12aca797adc0d4a20e5933b424eab (patch)
tree79e97ba4e949fa7ae44d81de9f34c6851f315c4f
parent762357e63a537250b5b1bf42e195e07e9ec1cad6 (diff)
downloadffmpeg-89b9441abad12aca797adc0d4a20e5933b424eab.tar.gz
only add prefix after \n
Originally committed as revision 2471 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/utils.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index f5a95433d2..ccb95f9981 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -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);
}