summaryrefslogtreecommitdiff
path: root/libavfilter/vf_fade.c
diff options
context:
space:
mode:
authorGyan Doshi <ffmpeg@gyani.pro>2019-07-29 10:53:12 +0530
committerGyan Doshi <ffmpeg@gyani.pro>2019-07-29 12:46:59 +0530
commit43891ea8ab286a08e731ebac78123c4f1b1d35ca (patch)
tree7273605574b5b911488d80647ecb9c9fe04decea /libavfilter/vf_fade.c
parent20fed2f0ab197d60801280dfc844f6b29a397ff2 (diff)
avfilter/fade: don't allow nb_frames == 0
In filter init, there's a division by nb_frames but value isn't checked.
Diffstat (limited to 'libavfilter/vf_fade.c')
-rw-r--r--libavfilter/vf_fade.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/vf_fade.c b/libavfilter/vf_fade.c
index 17eca109b6..bec765a09e 100644
--- a/libavfilter/vf_fade.c
+++ b/libavfilter/vf_fade.c
@@ -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 },