Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenedict Endemann <bendemann@make.tv>2013-10-26 17:22:44 +0400
committerStefano Sabatini <stefasab@gmail.com>2013-10-27 18:01:02 +0400
commit696aa74b1ab3199415a247f59022e1a8bf1d2ddc (patch)
tree1cfc3479967d00565c5cdd9ebdb9aced567f0a15 /libavfilter/vf_overlay.c
parent2c7c2a53b9423e60e345933f4c8e60802dc66590 (diff)
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: Stefano Sabatini <stefasab@gmail.com>
Diffstat (limited to 'libavfilter/vf_overlay.c')
-rw-r--r--libavfilter/vf_overlay.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/vf_overlay.c b/libavfilter/vf_overlay.c
index b5ade85401..89e11e8376 100644
--- a/libavfilter/vf_overlay.c
+++ b/libavfilter/vf_overlay.c
@@ -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) {