diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-12-31 20:52:52 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-12-31 20:55:03 +0100 |
commit | 6e8df250fd98e6eae9c47d2c4eca7299a888a70c (patch) | |
tree | 6726f08defc81b2e84f2d3ec231db2e1ef33fd45 | |
parent | 49ec0d8ed2462f0d4e8294b9eeb3a735c83f0319 (diff) | |
download | ffmpeg-6e8df250fd98e6eae9c47d2c4eca7299a888a70c.tar.gz |
mpeg12: fix frame_pred_frame_dct handling in field pictures
Fixes Ticket254
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/mpeg12.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c index 1410de5467..5ca9bb8d90 100644 --- a/libavcodec/mpeg12.c +++ b/libavcodec/mpeg12.c @@ -878,7 +878,8 @@ static int mpeg_decode_mb(MpegEncContext *s, DCTELEM block[12][64]) s->mv_dir = MV_DIR_FORWARD; if (s->picture_structure == PICT_FRAME) { - if (!s->frame_pred_frame_dct) + if (s->picture_structure == PICT_FRAME + && !s->frame_pred_frame_dct) s->interlaced_dct = get_bits1(&s->gb); s->mv_type = MV_TYPE_16X16; } else { @@ -900,7 +901,7 @@ static int mpeg_decode_mb(MpegEncContext *s, DCTELEM block[12][64]) av_assert2(mb_type & MB_TYPE_L0L1); // FIXME decide if MBs in field pictures are MB_TYPE_INTERLACED /* get additional motion vector type */ - if (s->frame_pred_frame_dct) + if (s->picture_structure == PICT_FRAME && s->frame_pred_frame_dct) motion_type = MT_FRAME; else { motion_type = get_bits(&s->gb, 2); |