diff options
author | Nicolas Dufresne <nicolas.dufresne@collabora.com> | 2021-05-19 16:35:01 -0400 |
---|---|---|
committer | Nicolas Dufresne <nicolas.dufresne@collabora.com> | 2021-05-19 16:39:22 -0400 |
commit | f39985f88af011e1d4d3c0bf1578197b3e05a6f9 (patch) | |
tree | a0d12fc984daddd368befd1d21ca3daf78c2ec93 /gst | |
parent | 3897b24f6978f527f4294f65bda10d255749ce57 (diff) | |
download | gstreamer-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.c | 4 |
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) { \ |