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>
This commit is contained in:
Nicolas Dufresne 2021-05-19 16:35:01 -04:00
parent 3897b24f69
commit f39985f88a

View file

@ -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) { \