diff options
author | Anton Khirnov <anton@khirnov.net> | 2016-03-24 21:38:54 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2016-03-25 14:53:31 +0100 |
commit | a638e9184d63e57e67901f34afe919fd56fd3ac4 (patch) | |
tree | 69dd0caeb9267634d7243b12d14d22d647010487 /libavfilter/vf_fade.c | |
parent | 3b08d9d932eef09403074d5af31e10d8011e840b (diff) | |
download | ffmpeg-a638e9184d63e57e67901f34afe919fd56fd3ac4.tar.gz |
vf_fade: make sure the slice end is always in the frame
CC: libav-stable@libav.org
Diffstat (limited to 'libavfilter/vf_fade.c')
-rw-r--r-- | libavfilter/vf_fade.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/vf_fade.c b/libavfilter/vf_fade.c index eac0c2c9a9..eb6d82a894 100644 --- a/libavfilter/vf_fade.c +++ b/libavfilter/vf_fade.c @@ -123,7 +123,7 @@ static int filter_slice_chroma(AVFilterContext *ctx, void *arg, int jobnr, AVFrame *frame = arg; int slice_h = FFALIGN(frame->height / nb_jobs, 1 << s->vsub); int slice_start = jobnr * slice_h; - int slice_end = (jobnr == nb_jobs - 1) ? frame->height : (jobnr + 1) * slice_h; + int slice_end = FFMIN((jobnr + 1) * slice_h, frame->height); int i, j, plane; for (plane = 1; plane < 3; plane++) { |