]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/rv10.c
Restructure dummy frame allocation.
[ffmpeg] / libavcodec / rv10.c
index d552bf9501c35bb3cf00059b135a3dc0fc026df9..004c02d194715082f7bf74bd1fb3c0add58a3d44 100644 (file)
@@ -367,11 +367,12 @@ static int rv20_decode_picture_header(MpegEncContext *s)
         }
         if(new_w != s->width || new_h != s->height){
             av_log(s->avctx, AV_LOG_DEBUG, "attempting to change resolution to %dx%d\n", new_w, new_h);
-            if (avcodec_check_dimensions(s->avctx, new_h, new_w) < 0)
+            if (avcodec_check_dimensions(s->avctx, new_w, new_h) < 0)
                 return -1;
             MPV_common_end(s);
-            s->width  = s->avctx->width = new_w;
-            s->height = s->avctx->height= new_h;
+            avcodec_set_dimensions(s->avctx, new_w, new_h);
+            s->width  = new_w;
+            s->height = new_h;
             if (MPV_common_init(s) < 0)
                 return -1;
         }