diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-05-09 19:41:05 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-05-09 19:43:30 +0200 |
commit | 398e3a591fb8739a5af72f802153700fefa92098 (patch) | |
tree | ae891e1a82058b2b4ec5f3336bf3a23b1370380d /libavcodec/vc1.c | |
parent | 3554c2fafc46861624cbb634e175277b26eb1664 (diff) | |
download | ffmpeg-398e3a591fb8739a5af72f802153700fefa92098.tar.gz |
avcodec: replace uses of deprecated avcodec_set_dimensions()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/vc1.c')
-rw-r--r-- | libavcodec/vc1.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c index 89fa7ffdff..c7f3561cbc 100644 --- a/libavcodec/vc1.c +++ b/libavcodec/vc1.c @@ -372,7 +372,11 @@ int ff_vc1_decode_sequence_header(AVCodecContext *avctx, VC1Context *v, GetBitCo if (v->res_sprite) { int w = get_bits(gb, 11); int h = get_bits(gb, 11); - avcodec_set_dimensions(v->s.avctx, w, h); + int ret = ff_set_dimensions(v->s.avctx, w, h); + if (ret < 0) { + av_log(avctx, AV_LOG_ERROR, "Failed to set dimensions %d %d\n", w, h); + return ret; + } skip_bits(gb, 5); //frame rate v->res_x8 = get_bits1(gb); if (get_bits1(gb)) { // something to do with DC VLC selection @@ -516,6 +520,7 @@ int ff_vc1_decode_entry_point(AVCodecContext *avctx, VC1Context *v, GetBitContex { int i; int w,h; + int ret; av_log(avctx, AV_LOG_DEBUG, "Entry point: %08X\n", show_bits_long(gb, 32)); v->broken_link = get_bits1(gb); @@ -545,7 +550,11 @@ int ff_vc1_decode_entry_point(AVCodecContext *avctx, VC1Context *v, GetBitContex w = v->max_coded_width; h = v->max_coded_height; } - avcodec_set_dimensions(avctx, w, h); + if ((ret = ff_set_dimensions(avctx, w, h)) < 0) { + av_log(avctx, AV_LOG_ERROR, "Failed to set dimensions %d %d\n", w, h); + return ret; + } + if (v->extended_mv) v->extended_dmv = get_bits1(gb); if ((v->range_mapy_flag = get_bits1(gb))) { |