]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/ansi.c
lavc: support extracting audio service type from side data
[ffmpeg] / libavcodec / ansi.c
index 95b5be467806d6d9d18793853bc9cccadcde2851..556bfe44616fc2e9d9795dc8cb9798f7fd1c1f65 100644 (file)
@@ -88,9 +88,11 @@ static av_cold int decode_init(AVCodecContext *avctx)
     s->fg          = DEFAULT_FG_COLOR;
     s->bg          = DEFAULT_BG_COLOR;
 
-    if (!avctx->width || !avctx->height)
-        ff_set_dimensions(avctx, 80 << 3, 25 << 4);
-
+    if (!avctx->width || !avctx->height) {
+        int ret = ff_set_dimensions(avctx, 80 << 3, 25 << 4);
+        if (ret < 0)
+            return ret;
+    }
     return 0;
 }