summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorNicolas Dufresne <nicolas.dufresne@collabora.com>2021-05-19 16:35:01 -0400
committerNicolas Dufresne <nicolas.dufresne@collabora.com>2021-05-19 16:39:22 -0400
commitf39985f88af011e1d4d3c0bf1578197b3e05a6f9 (patch)
treea0d12fc984daddd368befd1d21ca3daf78c2ec93 /gst
parent3897b24f6978f527f4294f65bda10d255749ce57 (diff)
downloadgstreamer-plugins-base-f39985f88af011e1d4d3c0bf1578197b3e05a6f9.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/1160>
Diffstat (limited to 'gst')
-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 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) { \