diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-03-19 17:59:42 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-03-19 18:16:42 +0100 |
commit | 493296800c4cfd76561f71ded5f0893108063e67 (patch) | |
tree | 034d1e26b647d7b3fa2cc59720ec1b4a4bdaf9ef /libavcodec/mjpegdec.c | |
parent | 046a75eea091e7d079bd3e5c9f5f028d7b920c32 (diff) | |
download | ffmpeg-493296800c4cfd76561f71ded5f0893108063e67.tar.gz |
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@gmx.at>
Diffstat (limited to 'libavcodec/mjpegdec.c')
-rw-r--r-- | libavcodec/mjpegdec.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index c4f855b9bf..d019f655f2 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; |