Commit 43891ea8 authored by Gyan Doshi's avatar Gyan Doshi

avfilter/fade: don't allow nb_frames == 0

In filter init, there's a division by nb_frames but value isn't checked.
parent 20fed2f0
......@@ -381,9 +381,9 @@ static const AVOption fade_options[] = {
{ "s", "Number of the first frame to which to apply the effect.",
OFFSET(start_frame), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, FLAGS },
{ "nb_frames", "Number of frames to which the effect should be applied.",
OFFSET(nb_frames), AV_OPT_TYPE_INT, { .i64 = 25 }, 0, INT_MAX, FLAGS },
OFFSET(nb_frames), AV_OPT_TYPE_INT, { .i64 = 25 }, 1, INT_MAX, FLAGS },
{ "n", "Number of frames to which the effect should be applied.",
OFFSET(nb_frames), AV_OPT_TYPE_INT, { .i64 = 25 }, 0, INT_MAX, FLAGS },
OFFSET(nb_frames), AV_OPT_TYPE_INT, { .i64 = 25 }, 1, INT_MAX, FLAGS },
{ "alpha", "fade alpha if it is available on the input", OFFSET(alpha), AV_OPT_TYPE_BOOL, {.i64 = 0 }, 0, 1, FLAGS },
{ "start_time", "Number of seconds of the beginning of the effect.",
OFFSET(start_time), AV_OPT_TYPE_DURATION, {.i64 = 0. }, 0, INT64_MAX, FLAGS },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment