]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/dpx.c
Use av_frame_copy() to simplify code where appropriate.
[ffmpeg] / libavcodec / dpx.c
index da7457d753e8affacc99f35f1f2c203e40cc697e..0dfa5385d19ec04a0320b7322c791fd2e27ed57f 100644 (file)
@@ -147,10 +147,9 @@ static int decode_frame(AVCodecContext *avctx,
             return AVERROR_INVALIDDATA;
     }
 
-    if ((ret = av_image_check_size(w, h, 0, avctx)) < 0)
+    if ((ret = ff_set_dimensions(avctx, w, h)) < 0)
         return ret;
-    if (w != avctx->width || h != avctx->height)
-        avcodec_set_dimensions(avctx, w, h);
+
     if ((ret = ff_get_buffer(avctx, p, 0)) < 0) {
         av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
         return ret;