[FFmpeg-cvslog] avcodec/mjpegdec: Switch default interlaced polarity for MJPG to 1

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 18:01:04 2014 +0100| [b052525f9b347d662b745da98893f00acef1204e] | committer: Michael Niedermayer

avcodec/mjpegdec: Switch default interlaced polarity for MJPG to 1

Fixes Ticket3229

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

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

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

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

diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 2307594..cb8f2b9 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -131,6 +131,9 @@ av_cold int ff_mjpeg_decode_init(AVCodecContext *avctx)
     if (avctx->field_order == AV_FIELD_BB) { /* quicktime icefloe 019 */
         s->interlace_polarity = 1;           /* bottom field first */
         av_log(avctx, AV_LOG_DEBUG, "bottom field first\n");
+    } else if (avctx->field_order == AV_FIELD_UNKNOWN) {
+        if (avctx->codec_tag == AV_RL32("MJPG"))
+            s->interlace_polarity = 1;
     }
 
     if (   avctx->extradata_size > 8



More information about the ffmpeg-cvslog mailing list