Commit 696aa74b authored by Benedict Endemann's avatar Benedict Endemann Committed by Stefano Sabatini

lavfi/overlay: correct small error in intersection detection

The image size of the destination image was used to determine if a source
image was positioned outside the destination image, that no intersection
could occur.  Actually for these two cases the size of the source image
has to be used!
Signed-off-by: 's avatarStefano Sabatini <stefasab@gmail.com>
parent 2c7c2a53
......@@ -346,8 +346,8 @@ static void blend_image(AVFilterContext *ctx,
const int dst_w = dst->width;
const int dst_h = dst->height;
if (x >= dst_w || x+dst_w < 0 ||
y >= dst_h || y+dst_h < 0)
if (x >= dst_w || x+src_w < 0 ||
y >= dst_h || y+src_h < 0)
return; /* no intersection */
if (s->main_is_packed_rgb) {
......
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