set log level to AV_LOG_DEBUG if -debug ... is used
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 7 Jun 2005 21:53:56 +0000 (21:53 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 7 Jun 2005 21:53:56 +0000 (21:53 +0000)
Originally committed as revision 4359 to svn://svn.ffmpeg.org/ffmpeg/trunk

ffmpeg.c
ffplay.c

index bafae51..4b78ff5 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2291,6 +2291,7 @@ static void opt_error_concealment(const char *arg)
 static void opt_debug(const char *arg)
 {
     debug = atoi(arg);
+    av_log_set_level(AV_LOG_DEBUG);
 }
 
 static void opt_vismv(const char *arg)
index 2df39d9..eac2cf2 100644 (file)
--- a/ffplay.c
+++ b/ffplay.c
@@ -1179,6 +1179,8 @@ static int stream_component_open(VideoState *is, int stream_index)
     codec = avcodec_find_decoder(enc->codec_id);
     enc->debug_mv = debug_mv;
     enc->debug = debug;
+    if(debug)
+        av_log_set_level(AV_LOG_DEBUG);
     enc->workaround_bugs = workaround_bugs;
     enc->lowres = lowres;
     if(lowres) enc->flags |= CODEC_FLAG_EMU_EDGE;