Le quintidi 15 brumaire, an CCXXIV, Kyle Swanson a écrit :
> + { "color", "set noise color", OFFSET(color),
> AV_OPT_TYPE_STRING, {.str = "white"}, CHAR_MIN, CHAR_MAX, FLAGS },
> + if (!strcmp(s->color, "pink")) {
> + s->filter = pink_filter;
> + } else if(!strcmp(s->color, "brown")) {
> + s->filter = brown_filter;
> + } else if(!strcmp(s->color, "white")) {
> + s->filter = white_filter;
> + } else {
> + av_log(ctx, AV_LOG_ERROR, "Invalid noise color: %s\n", s->color);
> + return AVERROR_OPTION_NOT_FOUND;
> + }
Did you miss the part where I suggested to use AV_OPT_TYPE_FLAG for this? It
is really much better than reimplementing the parsing.
Regards,
--
Nicolas George
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list [email protected] http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
