]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/proresdec2: allow changing resolution
authorPaul B Mahol <onemda@gmail.com>
Wed, 5 Dec 2018 17:50:33 +0000 (18:50 +0100)
committerPaul B Mahol <onemda@gmail.com>
Mon, 10 Dec 2018 16:25:49 +0000 (17:25 +0100)
libavcodec/proresdec2.c

index 6b246319efeae3c43579a38064b0697e6922ce80..6209c229c9d01821ac4c707e344367824e7ccba5 100644 (file)
@@ -221,9 +221,12 @@ static int decode_frame_header(ProresContext *ctx, const uint8_t *buf,
     height = AV_RB16(buf + 10);
 
     if (width != avctx->width || height != avctx->height) {
-        av_log(avctx, AV_LOG_ERROR, "picture resolution change: %dx%d -> %dx%d\n",
+        int ret;
+
+        av_log(avctx, AV_LOG_WARNING, "picture resolution change: %dx%d -> %dx%d\n",
                avctx->width, avctx->height, width, height);
-        return AVERROR_PATCHWELCOME;
+        if ((ret = ff_set_dimensions(avctx, width, height)) < 0)
+            return ret;
     }
 
     ctx->frame_type = (buf[12] >> 2) & 3;