From e61f5b21385e5b0f5bce594477d757b841330d6e Mon Sep 17 00:00:00 2001 From: "Reynaldo H. Verdejo Pinochet" Date: Thu, 12 Nov 2015 14:01:03 -0800 Subject: [PATCH] videoblend: special case 1x1 src dims on increment computation Fix crash with 1x1 overlay pixmap https://bugzilla.gnome.org/show_bug.cgi?id=757290 --- gst-libs/gst/video/video-blend.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gst-libs/gst/video/video-blend.c b/gst-libs/gst/video/video-blend.c index 8dc65c57b8..138a31475d 100644 --- a/gst-libs/gst/video/video-blend.c +++ b/gst-libs/gst/video/video-blend.c @@ -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 (&dest_frame, dest, *dest_buffer, GST_MAP_WRITE); - if (dest_height == 1) + if (dest_height == 1 || src->height == 1) y_increment = 0; else y_increment = ((src->height - 1) << 16) / (dest_height - 1) - 1; - if (dest_width == 1) + if (dest_width == 1 || src->width == 1) x_increment = 0; else x_increment = ((src->width - 1) << 16) / (dest_width - 1) - 1;