[Bug 757290] gdkpixbufoverlay crash

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Sun Nov 8 17:01:11 PST 2015


https://bugzilla.gnome.org/show_bug.cgi?id=757290

Nicolas Dufresne (stormer) <nicolas.dufresne at collabora.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nicolas.dufresne at collabora.
                   |                            |co.uk

--- Comment #2 from Nicolas Dufresne (stormer) <nicolas.dufresne at collabora.co.uk> ---
> why aren't we using GstVideoScaler here?

This API precedes the video convert and scale API. It should be ported of
course.

> index 8dc65c5..138a314 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;

That make sense to me regardless what this code is about. It protects against
having -1 here (which would go badly).

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list