]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/bintext: Add error message when resolution is too small for font.
authorNikolas Bowe <nbowe@google.com>
Mon, 8 Apr 2019 22:22:10 +0000 (15:22 -0700)
committerMichael Niedermayer <michael@niedermayer.cc>
Thu, 25 Apr 2019 12:49:51 +0000 (14:49 +0200)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/bintext.c

index d85f2c2dd443504d8d51f32ec36e59b5f622c4a0..49b75c9e271ea8140d3f27fea763e248aa54c8b6 100644 (file)
@@ -93,8 +93,10 @@ static av_cold int decode_init(AVCodecContext *avctx)
             break;
         }
     }
-    if (avctx->width < FONT_WIDTH || avctx->height < s->font_height)
+    if (avctx->width < FONT_WIDTH || avctx->height < s->font_height) {
+        av_log(avctx, AV_LOG_ERROR, "Resolution too small for font.\n");
         return AVERROR_INVALIDDATA;
+    }
 
     return 0;
 }