diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-11-01 14:01:02 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-11-01 14:01:02 +0100 |
commit | 4a356512676629b4a289ea33f2b39b5f151cfae3 (patch) | |
tree | c4391d9281d285e0c5c53a4000a3918de7dbaf31 /libavcodec/dvdec.c | |
parent | f016a23c7fa0b089a394e25eeefa5d5f4d99d926 (diff) | |
parent | d6da372984c87fd6288c148c291065d6032ceda3 (diff) | |
download | ffmpeg-4a356512676629b4a289ea33f2b39b5f151cfae3.tar.gz |
Merge commit 'd6da372984c87fd6288c148c291065d6032ceda3'
* commit 'd6da372984c87fd6288c148c291065d6032ceda3':
eacmv: stop using deprecated avcodec_set_dimensions
dvdsubdec: stop using deprecated avcodec_set_dimensions
dvdec: stop using deprecated avcodec_set_dimensions
dpx: stop using deprecated avcodec_set_dimensions
Conflicts:
libavcodec/dpx.c
libavcodec/dvdec.c
libavcodec/dvdsubdec.c
libavcodec/eacmv.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/dvdec.c')
-rw-r--r-- | libavcodec/dvdec.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libavcodec/dvdec.c b/libavcodec/dvdec.c index c46c2fff32..e7da50bf4c 100644 --- a/libavcodec/dvdec.c +++ b/libavcodec/dvdec.c @@ -319,7 +319,7 @@ static int dvvideo_decode_frame(AVCodecContext *avctx, int buf_size = avpkt->size; DVVideoContext *s = avctx->priv_data; const uint8_t* vsc_pack; - int ret, apt, is16_9; + int apt, is16_9, ret; s->sys = avpriv_dv_frame_profile2(avctx, s->sys, buf, buf_size); if (!s->sys || buf_size < s->sys->frame_size || ff_dv_init_dynamic_tables(s->sys)) { @@ -331,7 +331,11 @@ static int dvvideo_decode_frame(AVCodecContext *avctx, s->picture.pict_type = AV_PICTURE_TYPE_I; avctx->pix_fmt = s->sys->pix_fmt; avctx->time_base = s->sys->time_base; - avcodec_set_dimensions(avctx, s->sys->width, s->sys->height); + + ret = ff_set_dimensions(avctx, s->sys->width, s->sys->height); + if (ret < 0) + return ret; + if ((ret = ff_get_buffer(avctx, &s->picture, 0)) < 0) return ret; s->picture.interlaced_frame = 1; |