diff options
author | Tomas Härdin <tomas.hardin@codemill.se> | 2012-10-15 16:13:18 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-15 18:53:44 +0200 |
commit | 2b4bbd12c2ece58d51b53da7c4db2e0554920ba0 (patch) | |
tree | 1d384379fb5972a9aab8e3e223e7660a37e6ce38 /libavcodec/dvdec.c | |
parent | 0ee57f8b1476ad39260e97b58af04c5092c2d9ed (diff) | |
download | ffmpeg-streaming-2b4bbd12c2ece58d51b53da7c4db2e0554920ba0.zip ffmpeg-streaming-2b4bbd12c2ece58d51b53da7c4db2e0554920ba0.tar.gz |
dvdec: Move the VSC pack parsing to before avctx->execute()
This allows the next commit to parse the FS flag.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/dvdec.c')
-rw-r--r-- | libavcodec/dvdec.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libavcodec/dvdec.c b/libavcodec/dvdec.c index a38d409..6306b5a 100644 --- a/libavcodec/dvdec.c +++ b/libavcodec/dvdec.c @@ -343,6 +343,14 @@ 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 */ + 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->buf = buf; avctx->execute(avctx, dv_decode_video_segment, s->sys->work_chunks, NULL, dv_work_pool_size(s->sys), sizeof(DVwork_chunk)); @@ -353,14 +361,6 @@ static int dvvideo_decode_frame(AVCodecContext *avctx, *data_size = sizeof(AVFrame); *(AVFrame*)data = s->picture; - /* Determine the codec's sample_aspect ratio 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]; - } - return s->sys->frame_size; } |