Commit dd990784 authored by Nikolas Bowe's avatar Nikolas Bowe Committed by Michael Niedermayer

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

Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent b9178636
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment