Commit 1f467220 authored by Stefano Sabatini's avatar Stefano Sabatini

lavfi/alphaextract: drop cur_linesize = out_linesize branch in draw_slice()

The code causes uninitialized data copy, and may be actually slower than
a loop over each line in case the padding is big.
parent fe63d413
......@@ -77,11 +77,6 @@ static int draw_slice(AVFilterLink *inlink, int y0, int h, int slice_dir)
pin += 4;
}
}
} else if (cur_buf->linesize[A] == out_buf->linesize[Y]) {
const int linesize = cur_buf->linesize[A];
memcpy(out_buf->data[Y] + y0 * linesize,
cur_buf->data[A] + y0 * linesize,
linesize * h);
} else {
const int linesize = FFMIN(out_buf->linesize[Y], cur_buf->linesize[A]);
int y;
......
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