[FFmpeg-devel] [PATCH]lavc/mjpegdec: Set sar for multiscope videos

Carl Eugen Hoyos cehoyos at ag.or.at
Tue Mar 8 10:41:03 CET 2016


Hi!

Attached patch fixes the samples in 
samples.ffmpeg.org/ffmpeg-bugs/trac/ticket4535 for me.

Please comment, Carl Eugen
-------------- next part --------------
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 1e83e88..e24db44 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -1878,8 +1878,10 @@ static int mjpeg_decode_com(MJpegDecodeContext *s)
             else if ((!strncmp(cbuf, "Intel(R) JPEG Library, version 1", 32) && s->avctx->codec_tag) ||
                      (!strncmp(cbuf, "Metasoft MJPEG Codec", 20)))
                 s->flipped = 1;
-            else if (!strcmp(cbuf, "MULTISCOPE II"))
+            else if (!strcmp(cbuf, "MULTISCOPE II")) {
+                s->avctx->sample_aspect_ratio = (AVRational) { 1, 2 };
                 s->multiscope = 2;
+            }
 
             av_free(cbuf);
         }


More information about the ffmpeg-devel mailing list