From 0236fa8b9e87547075d15931c0ac81a86250f862 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Mon, 21 Sep 2020 23:50:03 +1000 Subject: [PATCH] compositor: fix YUY2/UYVY/VYUY blending Don't overead memory. Fixup for https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/755 Part-of: --- gst/compositor/blend.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gst/compositor/blend.c b/gst/compositor/blend.c index 6eeba1c351..c2c015006e 100644 --- a/gst/compositor/blend.c +++ b/gst/compositor/blend.c @@ -969,8 +969,8 @@ blend_##name (GstVideoFrame * srcframe, gint xpos, gint ypos, \ xpos = 0; \ } \ if (ypos < dst_y_start) { \ - src += -ypos * src_stride; \ - src_height -= -ypos; \ + src += (dst_y_start - ypos) * src_stride; \ + src_height -= dst_y_start - ypos; \ ypos = dst_y_start; \ } \ \