compositor: fix YUY2/UYVY/VYUY blending

Don't overead memory.

Fixup for https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/755

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/823>
This commit is contained in:
Matthew Waters 2020-09-21 23:50:03 +10:00
parent 6643e941be
commit 0236fa8b9e

View file

@ -969,8 +969,8 @@ blend_##name (GstVideoFrame * srcframe, gint xpos, gint ypos, \
xpos = 0; \ xpos = 0; \
} \ } \
if (ypos < dst_y_start) { \ if (ypos < dst_y_start) { \
src += -ypos * src_stride; \ src += (dst_y_start - ypos) * src_stride; \
src_height -= -ypos; \ src_height -= dst_y_start - ypos; \
ypos = dst_y_start; \ ypos = dst_y_start; \
} \ } \
\ \