diff options
author | Tomas Härdin <tomas.hardin@codemill.se> | 2012-10-15 16:24:39 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-15 18:53:44 +0200 |
commit | 7b383bd9d71c361fab320a99dc09353d0074f565 (patch) | |
tree | 2f49c89425a917850e1498ca017ceaf318733c4c /libavcodec/dvdec.c | |
parent | 2b4bbd12c2ece58d51b53da7c4db2e0554920ba0 (diff) | |
download | ffmpeg-streaming-7b383bd9d71c361fab320a99dc09353d0074f565.zip ffmpeg-streaming-7b383bd9d71c361fab320a99dc09353d0074f565.tar.gz |
dvdec: Set top_field_first from FS flag
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/dvdec.c')
-rw-r--r-- | libavcodec/dvdec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/dvdec.c b/libavcodec/dvdec.c index 6306b5a..d3a1234 100644 --- a/libavcodec/dvdec.c +++ b/libavcodec/dvdec.c @@ -343,12 +343,13 @@ static int dvvideo_decode_frame(AVCodecContext *avctx, s->picture.interlaced_frame = 1; s->picture.top_field_first = 0; - /* Determine the codec's sample_aspect ratio from the packet */ + /* Determine the codec's sample_aspect ratio and field order from the packet */ vsc_pack = buf + 80*5 + 48 + 5; if ( *vsc_pack == dv_video_control ) { apt = buf[4] & 0x07; is16_9 = (vsc_pack[2] & 0x07) == 0x02 || (!apt && (vsc_pack[2] & 0x07) == 0x07); avctx->sample_aspect_ratio = s->sys->sar[is16_9]; + s->picture.top_field_first = !(vsc_pack[3] & 0x40); } s->buf = buf; |