mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 01:30:38 +00:00
videoblend: special case 1x1 src dims on increment computation
Fix crash with 1x1 overlay pixmap https://bugzilla.gnome.org/show_bug.cgi?id=757290
This commit is contained in:
parent
0416f121f2
commit
e61f5b2138
1 changed files with 2 additions and 2 deletions
|
@ -186,12 +186,12 @@ gst_video_blend_scale_linear_RGBA (GstVideoInfo * src, GstBuffer * src_buffer,
|
||||||
gst_video_frame_map (&src_frame, src, src_buffer, GST_MAP_READ);
|
gst_video_frame_map (&src_frame, src, src_buffer, GST_MAP_READ);
|
||||||
gst_video_frame_map (&dest_frame, dest, *dest_buffer, GST_MAP_WRITE);
|
gst_video_frame_map (&dest_frame, dest, *dest_buffer, GST_MAP_WRITE);
|
||||||
|
|
||||||
if (dest_height == 1)
|
if (dest_height == 1 || src->height == 1)
|
||||||
y_increment = 0;
|
y_increment = 0;
|
||||||
else
|
else
|
||||||
y_increment = ((src->height - 1) << 16) / (dest_height - 1) - 1;
|
y_increment = ((src->height - 1) << 16) / (dest_height - 1) - 1;
|
||||||
|
|
||||||
if (dest_width == 1)
|
if (dest_width == 1 || src->width == 1)
|
||||||
x_increment = 0;
|
x_increment = 0;
|
||||||
else
|
else
|
||||||
x_increment = ((src->width - 1) << 16) / (dest_width - 1) - 1;
|
x_increment = ((src->width - 1) << 16) / (dest_width - 1) - 1;
|
||||||
|
|
Loading…
Reference in a new issue