[FFmpeg-cvslog] avcodec/bintext: Add error message when resolution is too small for font.

Nikolas Bowe git at videolan.org
Thu Apr 25 15:52:27 EEST 2019


ffmpeg | branch: master | Nikolas Bowe <nbowe at google.com> | Mon Apr  8 15:22:10 2019 -0700| [dd9907847c0d8a4836c441cfdd58c5ad31f9b819] | committer: Michael Niedermayer

avcodec/bintext: Add error message when resolution is too small for font.

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=dd9907847c0d8a4836c441cfdd58c5ad31f9b819
---

 libavcodec/bintext.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavcodec/bintext.c b/libavcodec/bintext.c
index d85f2c2dd4..49b75c9e27 100644
--- a/libavcodec/bintext.c
+++ b/libavcodec/bintext.c
@@ -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;
 }



More information about the ffmpeg-cvslog mailing list