[FFmpeg-devel] [PATCH] libavfilter/vf_overlay.c Correct small error in intersection detection.
Stefano Sabatini
stefasab at gmail.com
Sun Oct 27 15:04:20 CET 2013
On date Saturday 2013-10-26 15:22:44 +0200, Benedict Endemann encoded:
> The image size of the destination image was used to
> determine if an source image was positioned in a way
> 'left' or 'above' the destination image, that no
> intersection could occur.
> Actually for this two cases the size of the source image
> has to be used!
>
> ---
> libavfilter/vf_overlay.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/libavfilter/vf_overlay.c b/libavfilter/vf_overlay.c
> index b5ade85..89e11e8 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 */
Applied, thanks!
--
FFmpeg = Furious & Fabulous Multimedia Pacific Elastic Gadget
More information about the ffmpeg-devel
mailing list