eatqi: stop using deprecated avcodec_set_dimensions
authorAnton Khirnov <anton@khirnov.net>
Sun, 27 Oct 2013 09:02:26 +0000 (10:02 +0100)
committerAnton Khirnov <anton@khirnov.net>
Thu, 31 Oct 2013 19:14:15 +0000 (20:14 +0100)
libavcodec/eatqi.c

index 9f7ec4d..2345cc7 100644 (file)
@@ -111,8 +111,9 @@ static int tqi_decode_frame(AVCodecContext *avctx,
     tqi_calculate_qtable(s, buf[4]);
     buf += 8;
 
-    if (s->avctx->width!=s->width || s->avctx->height!=s->height)
-        avcodec_set_dimensions(s->avctx, s->width, s->height);
+    ret = ff_set_dimensions(s->avctx, s->width, s->height);
+    if (ret < 0)
+        return ret;
 
     if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) {
         av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");