Browse Source

dvdec: Set top_field_first from FS flag

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n1.1
Tomas Härdin Michael Niedermayer 13 years ago
parent
commit
7b383bd9d7
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libavcodec/dvdec.c

+ 2
- 1
libavcodec/dvdec.c View File

@@ -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;


Loading…
Cancel
Save