]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/targa.c
lavd/pulse_audio_enc: fix flush return code
[ffmpeg] / libavcodec / targa.c
index b3616c29d76e0d6c0d0b1f38ee75a81196183ff1..b0c9b55f3335aa0afc334d6468a9640634663d92 100644 (file)
@@ -173,10 +173,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)
         return ret;
     p->pict_type = AV_PICTURE_TYPE_I;