summaryrefslogtreecommitdiff
path: root/libavcodec/bintext.c
diff options
context:
space:
mode:
authorNikolas Bowe <nbowe@google.com>2019-04-08 15:22:10 -0700
committerMichael Niedermayer <michael@niedermayer.cc>2019-04-25 14:49:51 +0200
commitdd9907847c0d8a4836c441cfdd58c5ad31f9b819 (patch)
treef5b8d2ab94a8a66a4592ecd281a16192d94641f2 /libavcodec/bintext.c
parentb91786360f481e8fbc062af8c05dd0f971398afa (diff)
downloadffmpeg-dd9907847c0d8a4836c441cfdd58c5ad31f9b819.tar.gz
avcodec/bintext: Add error message when resolution is too small for font.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/bintext.c')
-rw-r--r--libavcodec/bintext.c4
1 files changed, 3 insertions, 1 deletions
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;
}