mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
video-blend: segfault when xpos >= video size
When the xpos is given as greater than or equal to the video size, we get a segfault, due to improper condition. Hence adding proper conditions. https://bugzilla.gnome.org/show_bug.cgi?id=738984
This commit is contained in:
parent
900d0267d5
commit
2847a8108c
1 changed files with 2 additions and 4 deletions
|
@ -325,12 +325,10 @@ gst_video_blend (GstVideoFrame * dest,
|
||||||
|
|
||||||
/* adjust width/height if the src is bigger than dest */
|
/* adjust width/height if the src is bigger than dest */
|
||||||
if (x + src_width > dest_width)
|
if (x + src_width > dest_width)
|
||||||
if (dest_width > x)
|
src_width = dest_width - x;
|
||||||
src_width = dest_width - x;
|
|
||||||
|
|
||||||
if (y + src_height > dest_height)
|
if (y + src_height > dest_height)
|
||||||
if (dest_height > y)
|
src_height = dest_height - y;
|
||||||
src_height = dest_height - y;
|
|
||||||
|
|
||||||
/* Mainloop doing the needed conversions, and blending */
|
/* Mainloop doing the needed conversions, and blending */
|
||||||
for (i = y; i < y + src_height; i++) {
|
for (i = y; i < y + src_height; i++) {
|
||||||
|
|
Loading…
Reference in a new issue