Commit a638e918 authored by Anton Khirnov's avatar Anton Khirnov

vf_fade: make sure the slice end is always in the frame

CC: libav-stable@libav.org
parent 3b08d9d9
......@@ -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++) {
......
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