On 11/5/15, Nicolas George <geo...@nsup.org> wrote: > Le quintidi 15 brumaire, an CCXXIV, Kyle Swanson a ecrit : >> + { "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.
Hmm, why not simple enum/int? _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel