[FFmpeg-devel] [PATCH]Set bits_per_raw_sample in mjpeg decoder

Carl Eugen Hoyos cehoyos at ag.or.at
Sun Jul 28 04:33:52 CEST 2013


Hi!

The ljpeg decoder supports 9-15 bit gray decoding, attached 
patch makes FFmpeg show bpc in these cases.

Please comment, Carl Eugen
-------------- next part --------------
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 37a5414..c92738f 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -221,6 +221,7 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
 
     /* XXX: verify len field validity */
     len     = get_bits(&s->gb, 16);
+    s->avctx->bits_per_raw_sample =
     s->bits = get_bits(&s->gb, 8);
 
     if (s->pegasus_rct)


More information about the ffmpeg-devel mailing list