Commit aa40df48 authored by Derek Buitenhuis's avatar Derek Buitenhuis

Merge commit 'a638e918'

* commit 'a638e918':
  vf_fade: make sure the slice end is always in the frame
Merged-by: 's avatarDerek Buitenhuis <derek.buitenhuis@gmail.com>
parents 5f587b1d a638e918
...@@ -247,7 +247,7 @@ static int filter_slice_chroma(AVFilterContext *ctx, void *arg, int jobnr, ...@@ -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 width = AV_CEIL_RSHIFT(frame->width, s->hsub);
const int height= AV_CEIL_RSHIFT(frame->height, s->vsub); const int height= AV_CEIL_RSHIFT(frame->height, s->vsub);
int slice_start = (height * jobnr ) / nb_jobs; 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 (plane = 1; plane < 3; plane++) {
for (i = slice_start; i < slice_end; i++) { for (i = slice_start; i < slice_end; i++) {
......
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