diff options
author | Anton Khirnov <anton@khirnov.net> | 2013-10-27 10:02:26 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2013-10-31 20:14:15 +0100 |
commit | caeed8deeb0c991ce72f371b619055b6a62aee5e (patch) | |
tree | 579ce53e18eaae5d5d719b4dead5ad699d205381 /libavcodec | |
parent | 8451b5f00a210773ea51b4c705928e82c9fb7cff (diff) | |
download | ffmpeg-caeed8deeb0c991ce72f371b619055b6a62aee5e.tar.gz |
dvdec: stop using deprecated avcodec_set_dimensions
Diffstat (limited to 'libavcodec')
-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 4b7dfeebed..aee405314f 100644 --- a/libavcodec/dvdec.c +++ b/libavcodec/dvdec.c @@ -318,7 +318,7 @@ static int dvvideo_decode_frame(AVCodecContext *avctx, int buf_size = avpkt->size; DVVideoContext *s = avctx->priv_data; const uint8_t* vsc_pack; - int apt, is16_9; + int apt, is16_9, ret; s->sys = avpriv_dv_frame_profile(s->sys, buf, buf_size); if (!s->sys || buf_size < s->sys->frame_size || ff_dv_init_dynamic_tables(s->sys)) { @@ -330,7 +330,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 (ff_get_buffer(avctx, &s->picture, 0) < 0) { av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); return -1; |