summaryrefslogtreecommitdiffstats
path: root/libavcodec/dvdec.c
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2015-10-05 11:21:23 +0200
committerHendrik Leppkes <h.leppkes@gmail.com>2015-10-05 11:21:23 +0200
commitd0186a4ec4c4391906bf7dcd83d3ea3e3b858d82 (patch)
tree2d6f4449d142c5666634dacda71c9bf613231cc0 /libavcodec/dvdec.c
parentfecf775624c029f50cef697e1c40316b2d51a845 (diff)
parentcab63a8b594cdc365bb2581a12b3ac8e6dd480b2 (diff)
downloadffmpeg-streaming-d0186a4ec4c4391906bf7dcd83d3ea3e3b858d82.zip
ffmpeg-streaming-d0186a4ec4c4391906bf7dcd83d3ea3e3b858d82.tar.gz
Merge commit 'cab63a8b594cdc365bb2581a12b3ac8e6dd480b2'
* commit 'cab63a8b594cdc365bb2581a12b3ac8e6dd480b2': dv: Mark internal frame reference as const Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
Diffstat (limited to 'libavcodec/dvdec.c')
-rw-r--r--libavcodec/dvdec.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/libavcodec/dvdec.c b/libavcodec/dvdec.c
index 679075e..b75bcb9 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;
OpenPOWER on IntegriCloud