[FFmpeg-cvslog] lavc/mjpegdec: avoid printing useless message in default log level

Moritz Barsnick git at videolan.org
Tue Mar 8 16:43:48 CET 2016


ffmpeg | branch: master | Moritz Barsnick <barsnick at gmx.net> | Tue Mar  8 15:36:27 2016 +0100| [72babb8566bdc6d50c25267448491ec02ea1bdcc] | committer: Michael Niedermayer

lavc/mjpegdec: avoid printing useless message in default log level

The change of bps from 0 doesn't contain any info useful to the
user. This message is now at info log level only if the original
value is !=0, otherwise pushed back to debug log level. The
original value is displayed additionally.

Signed-off-by: Moritz Barsnick <barsnick at gmx.net>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=72babb8566bdc6d50c25267448491ec02ea1bdcc
---

 libavcodec/mjpegdec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 1e83e88..3e4b6f0 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -282,7 +282,7 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
     }
 
     if (s->avctx->bits_per_raw_sample != bits) {
-        av_log(s->avctx, AV_LOG_INFO, "Changing bps to %d\n", bits);
+        av_log(s->avctx, s->avctx->bits_per_raw_sample > 0 ? AV_LOG_INFO : AV_LOG_DEBUG, "Changing bps from %d to %d\n", s->avctx->bits_per_raw_sample, bits);
         s->avctx->bits_per_raw_sample = bits;
         init_idct(s->avctx);
     }



More information about the ffmpeg-cvslog mailing list