Browse code

rv10: stop using deprecated avcodec_set_dimensions

Anton Khirnov authored on 2013/10/27 18:02:26
Showing 1 changed files
... ...
@@ -28,6 +28,7 @@
28 28
 #include "libavutil/imgutils.h"
29 29
 #include "avcodec.h"
30 30
 #include "error_resilience.h"
31
+#include "internal.h"
31 32
 #include "mpegvideo.h"
32 33
 #include "mpeg4video.h"
33 34
 #include "h263.h"
... ...
@@ -358,10 +359,12 @@ static int rv20_decode_picture_header(RVDecContext *rv)
358 358
         if (new_w != s->width || new_h != s->height) {
359 359
             av_log(s->avctx, AV_LOG_DEBUG,
360 360
                    "attempting to change resolution to %dx%d\n", new_w, new_h);
361
-            if (av_image_check_size(new_w, new_h, 0, s->avctx) < 0)
362
-                return AVERROR_INVALIDDATA;
363 361
             ff_MPV_common_end(s);
364
-            avcodec_set_dimensions(s->avctx, new_w, new_h);
362
+
363
+            ret = ff_set_dimensions(s->avctx, new_w, new_h);
364
+            if (ret < 0)
365
+                return ret;
366
+
365 367
             s->width  = new_w;
366 368
             s->height = new_h;
367 369
             if ((ret = ff_MPV_common_init(s)) < 0)