X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fdvdec.c;h=b75bcb9a1f5eab3e7eb0ac00c0e8dd4623430577;hb=7bbd060324f05a32aa3cc748ea484abf499cfbd8;hp=679075e6a98d568c24ddee561074eae8245e9bd3;hpb=cda503a1b92c776cd197ec5a8879b793d9deaad8;p=ffmpeg diff --git a/libavcodec/dvdec.c b/libavcodec/dvdec.c index 679075e6a98..b75bcb9a1f5 100644 --- a/libavcodec/dvdec.c +++ b/libavcodec/dvdec.c @@ -499,6 +499,7 @@ static int dvvideo_decode_frame(AVCodecContext *avctx, void *data, uint8_t *buf = avpkt->data; int buf_size = avpkt->size; DVVideoContext *s = avctx->priv_data; + AVFrame *frame = data; const uint8_t *vsc_pack; int apt, is16_9, ret; const AVDVProfile *sys; @@ -519,9 +520,9 @@ static int dvvideo_decode_frame(AVCodecContext *avctx, void *data, s->sys = sys; } - s->frame = data; - s->frame->key_frame = 1; - s->frame->pict_type = AV_PICTURE_TYPE_I; + s->frame = frame; + frame->key_frame = 1; + frame->pict_type = AV_PICTURE_TYPE_I; avctx->pix_fmt = s->sys->pix_fmt; avctx->framerate = av_inv_q(s->sys->time_base); @@ -538,14 +539,14 @@ static int dvvideo_decode_frame(AVCodecContext *avctx, void *data, ff_set_sar(avctx, s->sys->sar[is16_9]); } - if ((ret = ff_get_buffer(avctx, s->frame, 0)) < 0) + if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) return ret; - s->frame->interlaced_frame = 1; - s->frame->top_field_first = 0; + frame->interlaced_frame = 1; + frame->top_field_first = 0; /* Determine the codec's field order from the packet */ if ( *vsc_pack == dv_video_control ) { - s->frame->top_field_first = !(vsc_pack[3] & 0x40); + frame->top_field_first = !(vsc_pack[3] & 0x40); } s->buf = buf;