[FFmpeg-devel] [PATCH] avfilter: add anoisesrc

Nicolas George george at nsup.org
Fri Nov 6 08:54:06 CET 2015


Le quintidi 15 brumaire, an CCXXIV, Kyle Swanson a écrit :
> +    { "color",        "set noise color",  OFFSET(color),        AV_OPT_TYPE_INT,       {.i64 =  1},      0,  INT64_MAX,  FLAGS, "color" },
> +    { "colour",       "set noise color",  OFFSET(color),        AV_OPT_TYPE_INT,       {.i64 =  1},      0,  INT64_MAX,  FLAGS, "color" },
> +    { "c",            "set noise color",  OFFSET(color),        AV_OPT_TYPE_INT,       {.i64 =  0},      0,  INT64_MAX,  FLAGS, "color" },

The max value should be 2.

> +        default:
> +            av_log(ctx, AV_LOG_ERROR, "Invalid noise color\n");
> +            return AVERROR_OPTION_NOT_FOUND;

... making this test unnecessary (an assert would be ok). And if it stays,
the value should be AVERROR(EINVAL).

Regards,

-- 
  Nicolas George


More information about the ffmpeg-devel mailing list