s->args[s->nb_args] = FFMAX(s->args[s->nb_args], 0) * 10 + buf[0] - '0';
break;
case ';':
- s->nb_args++;
+ if (s->nb_args < MAX_NB_ARGS)
+ s->nb_args++;
if (s->nb_args < MAX_NB_ARGS)
s->args[s->nb_args] = 0;
break;
return 0;
}
-AVCodec ff_ansi_decoder = {
+static const AVCodecDefault ansi_defaults[] = {
+ { "max_pixels", "640*480" },
+ { NULL },
+};
+
+const AVCodec ff_ansi_decoder = {
.name = "ansi",
.long_name = NULL_IF_CONFIG_SMALL("ASCII/ANSI art"),
.type = AVMEDIA_TYPE_VIDEO,
.decode = decode_frame,
.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
+ .defaults = ansi_defaults,
};