summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Dufresne <nicolas.dufresne@collabora.com>2021-05-20 11:58:58 -0400
committerNicolas Dufresne <nicolas.dufresne@collabora.com>2021-05-20 11:58:58 -0400
commit0f86fca8da23ebf0ec24cf6a4e3cbb842e02da7b (patch)
tree13209152a87a2af5b3d355f3cfa197daaeee6160
parent61e8ba683538e3bc4525fd7a7a062d0507593c0d (diff)
downloadgstreamer-plugins-base-0f86fca8da23ebf0ec24cf6a4e3cbb842e02da7b.tar.gz
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: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1163>
-rw-r--r--gst/compositor/blend.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gst/compositor/blend.c b/gst/compositor/blend.c
index 531b47294..9bd86f993 100644
--- a/gst/compositor/blend.c
+++ b/gst/compositor/blend.c
@@ -588,10 +588,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 > dest_height) { \
+ if (ypos + b_src_height > dest_height) { \
b_src_height = dest_height - ypos; \
} \
if (b_src_width < 0 || b_src_height < 0) { \