mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +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,11 +325,9 @@ 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 */
|
||||||
|
|
Loading…
Reference in a new issue