[FFmpeg-devel] [PATCHv2] avfilter: add anoisesrc
Nicolas George
george at nsup.org
Thu Nov 5 21:38:20 CET 2015
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20151105/93c2bc20/attachment.sig>
More information about the ffmpeg-devel
mailing list