diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-11-01 15:34:49 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-11-01 15:34:49 +0100 |
commit | 7630e564caaef008ae255c3b63ac725131073b6f (patch) | |
tree | 28d00107374434d841637f6a299446d1e7122f72 /libavcodec/rv10.c | |
parent | a897ba33e88316d2591a89ab93f8f69587d245ca (diff) | |
parent | c755870d52c8c29676e5ba7ee9557adf4a7ca934 (diff) | |
download | ffmpeg-7630e564caaef008ae255c3b63ac725131073b6f.tar.gz |
Merge commit 'c755870d52c8c29676e5ba7ee9557adf4a7ca934'
* commit 'c755870d52c8c29676e5ba7ee9557adf4a7ca934':
sgidec: stop using deprecated avcodec_set_dimensions
rv34: stop using deprecated avcodec_set_dimensions
rv10: stop using deprecated avcodec_set_dimensions
ptx: stop using deprecated avcodec_set_dimensions
Conflicts:
libavcodec/ptx.c
libavcodec/rv10.c
libavcodec/sgidec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/rv10.c')
-rw-r--r-- | libavcodec/rv10.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c index 5206533633..57ebdc577c 100644 --- a/libavcodec/rv10.c +++ b/libavcodec/rv10.c @@ -28,6 +28,7 @@ #include "libavutil/imgutils.h" #include "avcodec.h" #include "error_resilience.h" +#include "internal.h" #include "mpegvideo.h" #include "mpeg4video.h" #include "h263.h" @@ -363,8 +364,6 @@ static int rv20_decode_picture_header(RVDecContext *rv) AVRational old_aspect = s->avctx->sample_aspect_ratio; av_log(s->avctx, AV_LOG_DEBUG, "attempting to change resolution to %dx%d\n", new_w, new_h); - if (av_image_check_size(new_w, new_h, 0, s->avctx) < 0) - return AVERROR_INVALIDDATA; ff_MPV_common_end(s); // attempt to keep aspect during typical resolution switches @@ -374,7 +373,11 @@ static int rv20_decode_picture_header(RVDecContext *rv) s->avctx->sample_aspect_ratio = av_mul_q(old_aspect, (AVRational){2, 1}); if (new_w * s->height == 2 * new_h * s->width) s->avctx->sample_aspect_ratio = av_mul_q(old_aspect, (AVRational){1, 2}); - avcodec_set_dimensions(s->avctx, new_w, new_h); + + ret = ff_set_dimensions(s->avctx, new_w, new_h); + if (ret < 0) + return ret; + s->width = new_w; s->height = new_h; if ((ret = ff_MPV_common_init(s)) < 0) |