summaryrefslogtreecommitdiff
path: root/libavfilter/vf_fade.c
diff options
context:
space:
mode:
authorDerek Buitenhuis <derek.buitenhuis@gmail.com>2016-04-21 16:52:03 +0100
committerDerek Buitenhuis <derek.buitenhuis@gmail.com>2016-04-21 16:52:03 +0100
commitaa40df483b210ec95154848e068300ccd055286f (patch)
tree6dfc8b3d2d606431b33046e0f3ddad9c264b79a9 /libavfilter/vf_fade.c
parent5f587b1daf90a8c0bf4f2eb5c13b4022252ec498 (diff)
parenta638e9184d63e57e67901f34afe919fd56fd3ac4 (diff)
Merge commit 'a638e9184d63e57e67901f34afe919fd56fd3ac4'
* commit 'a638e9184d63e57e67901f34afe919fd56fd3ac4': vf_fade: make sure the slice end is always in the frame Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libavfilter/vf_fade.c')
-rw-r--r--libavfilter/vf_fade.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/vf_fade.c b/libavfilter/vf_fade.c
index f7b2b6a238..cf77d8723c 100644
--- a/libavfilter/vf_fade.c
+++ b/libavfilter/vf_fade.c
@@ -247,7 +247,7 @@ static int filter_slice_chroma(AVFilterContext *ctx, void *arg, int jobnr,
const int width = AV_CEIL_RSHIFT(frame->width, s->hsub);
const int height= AV_CEIL_RSHIFT(frame->height, s->vsub);
int slice_start = (height * jobnr ) / nb_jobs;
- int slice_end = (height * (jobnr+1)) / nb_jobs;
+ int slice_end = FFMIN(((height * (jobnr+1)) / nb_jobs), frame->height);
for (plane = 1; plane < 3; plane++) {
for (i = slice_start; i < slice_end; i++) {