]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/cdxl.c
ac3dec: simplify an expression
[ffmpeg] / libavcodec / cdxl.c
index b198c4ca0afa1f4341c2ce6b8ea3843d89f8a9c8..80a367163d7ef94ed47b82981ab2befa20ebd7da 100644 (file)
@@ -33,7 +33,6 @@
 
 typedef struct {
     AVCodecContext *avctx;
-    AVFrame        frame;
     int            bpp;
     int            format;
     int            padded_bits;
@@ -237,10 +236,8 @@ static int cdxl_decode_frame(AVCodecContext *avctx, void *data,
         return AVERROR_PATCHWELCOME;
     }
 
-    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);
 
     aligned_width = FFALIGN(c->avctx->width, 16);
     c->padded_bits  = aligned_width - c->avctx->width;