[FFmpeg-devel] [PATCH v2] lavc/mjpegdec: avoid printing useless message in default log level
Moritz Barsnick
barsnick at gmx.net
Tue Mar 8 16:55:02 CET 2016
The change of bps from 0 doesn't contain any useful information.
This message is now at info log level only if the original value
is !=0, otherwise pushed back to verbose log level. The original
value is displayed additionally.
Signed-off-by: Moritz Barsnick <barsnick at gmx.net>
---
libavcodec/mjpegdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 1e83e88..000d90c 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_VERBOSE, "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);
}
--
2.5.0
More information about the ffmpeg-devel
mailing list