From f39985f88af011e1d4d3c0bf1578197b3e05a6f9 Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Wed, 19 May 2021 16:35:01 -0400 Subject: compositor: Fix NV12 blend operation The full src_height/width was being used instead of the remaining width/height for the current band. As a side effect, that value would get erroneously reset and would cause overrun. Fixes #887 Part-of: --- gst/compositor/blend.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gst') diff --git a/gst/compositor/blend.c b/gst/compositor/blend.c index 61ac75e92..7a94c8c1e 100644 --- a/gst/compositor/blend.c +++ b/gst/compositor/blend.c @@ -617,10 +617,10 @@ blend_##format_name (GstVideoFrame * srcframe, gint xpos, gint ypos, \ } \ \ /* adjust width/height if the src is bigger than dest */ \ - if (xpos + src_width > dest_width) { \ + if (xpos + b_src_width > dest_width) { \ b_src_width = dest_width - xpos; \ } \ - if (ypos + src_height > dst_y_end) { \ + if (ypos + b_src_height > dst_y_end) { \ b_src_height = dst_y_end - ypos; \ } \ if (b_src_width < 0 || b_src_height < 0) { \ -- cgit v1.2.1