av_log(avctx, AV_LOG_ERROR, "not enough extradata\n");
return AVERROR_INVALIDDATA;
}
av_log(avctx, AV_LOG_ERROR, "not enough extradata\n");
return AVERROR_INVALIDDATA;
}
-
- s->frame = av_frame_alloc();
- if (!s->frame)
- return AVERROR(ENOMEM);
+ 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;
+ }
.name = "bintext",
.long_name = NULL_IF_CONFIG_SMALL("Binary text"),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_BINTEXT,
.priv_data_size = sizeof(XbinContext),
.init = decode_init,
.name = "bintext",
.long_name = NULL_IF_CONFIG_SMALL("Binary text"),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_BINTEXT,
.priv_data_size = sizeof(XbinContext),
.init = decode_init,
.name = "xbin",
.long_name = NULL_IF_CONFIG_SMALL("eXtended BINary text"),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_XBIN,
.priv_data_size = sizeof(XbinContext),
.init = decode_init,
.name = "xbin",
.long_name = NULL_IF_CONFIG_SMALL("eXtended BINary text"),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_XBIN,
.priv_data_size = sizeof(XbinContext),
.init = decode_init,
.name = "idf",
.long_name = NULL_IF_CONFIG_SMALL("iCEDraw text"),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_IDF,
.priv_data_size = sizeof(XbinContext),
.init = decode_init,
.name = "idf",
.long_name = NULL_IF_CONFIG_SMALL("iCEDraw text"),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_IDF,
.priv_data_size = sizeof(XbinContext),
.init = decode_init,