av_log(avctx, AV_LOG_ERROR, "not enough extradata\n");
return AVERROR_INVALIDDATA;
}
+ if (!s->font_height) {
+ av_log(avctx, AV_LOG_ERROR, "invalid font height\n");
+ return AVERROR_INVALIDDATA;
+ }
} else {
s->font_height = 8;
s->flags = 0;
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;
}
}
#if CONFIG_BINTEXT_DECODER
-AVCodec ff_bintext_decoder = {
+const AVCodec ff_bintext_decoder = {
.name = "bintext",
.long_name = NULL_IF_CONFIG_SMALL("Binary text"),
.type = AVMEDIA_TYPE_VIDEO,
};
#endif
#if CONFIG_XBIN_DECODER
-AVCodec ff_xbin_decoder = {
+const AVCodec ff_xbin_decoder = {
.name = "xbin",
.long_name = NULL_IF_CONFIG_SMALL("eXtended BINary text"),
.type = AVMEDIA_TYPE_VIDEO,
};
#endif
#if CONFIG_IDF_DECODER
-AVCodec ff_idf_decoder = {
+const AVCodec ff_idf_decoder = {
.name = "idf",
.long_name = NULL_IF_CONFIG_SMALL("iCEDraw text"),
.type = AVMEDIA_TYPE_VIDEO,