diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2010-12-25 22:49:19 +0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2010-12-25 22:49:19 +0300 |
commit | 52654005caa343e9d17c0776d05825f1d771f448 (patch) | |
tree | 62856ec57b66198ac97d56af62f55adbad18d11e /libavcodec/mpegvideo.c | |
parent | 58ec7e00db5a78bb2d18b43b88e340f9c1373efa (diff) |
Simplify tff setting code in MPV_frame_start().
Originally committed as revision 26090 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r-- | libavcodec/mpegvideo.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 9650066cee..65221f34f8 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -964,13 +964,11 @@ int MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx) s->current_picture_ptr= pic; //FIXME use only the vars from current_pic + s->current_picture_ptr->top_field_first= s->top_field_first; if(s->codec_id == CODEC_ID_MPEG1VIDEO || s->codec_id == CODEC_ID_MPEG2VIDEO) { - if(s->picture_structure == PICT_FRAME) - s->current_picture_ptr->top_field_first= s->top_field_first; - else + if(s->picture_structure != PICT_FRAME) s->current_picture_ptr->top_field_first= (s->picture_structure == PICT_TOP_FIELD) == s->first_field; - } else - s->current_picture_ptr->top_field_first= s->top_field_first; + } s->current_picture_ptr->interlaced_frame= !s->progressive_frame && !s->progressive_sequence; } |