[FFmpeg-cvslog] avcodec/mjpegdec: parse avid data from extradata

Michael Niedermayer git at videolan.org
Sun Mar 23 21:12:14 CET 2014


ffmpeg | branch: release/2.2 | Michael Niedermayer <michaelni at gmx.at> | Wed Mar 19 17:59:42 2014 +0100| [90c7bfb9be432075fac32a23f5e0af48da35608a] | committer: Michael Niedermayer

avcodec/mjpegdec: parse avid data from extradata

Makes no difference for any file tested but is needed
for following bug-fix

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 493296800c4cfd76561f71ded5f0893108063e67)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavcodec/mjpegdec.c |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 4394854..2307594 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -132,6 +132,13 @@ av_cold int ff_mjpeg_decode_init(AVCodecContext *avctx)
         s->interlace_polarity = 1;           /* bottom field first */
         av_log(avctx, AV_LOG_DEBUG, "bottom field first\n");
     }
+
+    if (   avctx->extradata_size > 8
+        && AV_RL32(avctx->extradata) == 0x2C
+        && AV_RL32(avctx->extradata+4) == 0x18) {
+        parse_avid(s, avctx->extradata, avctx->extradata_size);
+    }
+
     if (avctx->codec->id == AV_CODEC_ID_AMV)
         s->flipped = 1;
 



More information about the ffmpeg-cvslog mailing list