From: Mark Nauwelaerts Date: Mon, 16 Jul 2012 14:25:42 +0000 (+0200) Subject: videoblend: use correct stride when scaling X-Git-Tag: RELEASE-0.11.93~114 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d03f9261626c9fac4a9aefb4e146b66b0b4ed6e8;p=platform%2Fupstream%2Fgst-plugins-base.git videoblend: use correct stride when scaling --- diff --git a/gst-libs/gst/video/video-blend.c b/gst-libs/gst/video/video-blend.c index 54118d0..7eb1d87 100644 --- a/gst-libs/gst/video/video-blend.c +++ b/gst-libs/gst/video/video-blend.c @@ -161,8 +161,8 @@ gst_video_blend_scale_linear_RGBA (GstVideoInfo * src, GstBuffer * src_buffer, int j; int x; int dest_size; - guint dest_stride = dest_width * 4; - guint src_stride = src->width * 4; + guint dest_stride; + guint src_stride; guint8 *dest_pixels; guint8 *tmpbuf = g_malloc (dest_width * 8 * 4); GstVideoFrame src_frame, dest_frame; @@ -188,7 +188,8 @@ gst_video_blend_scale_linear_RGBA (GstVideoInfo * src, GstBuffer * src_buffer, else x_increment = ((src->width - 1) << 16) / (dest_width - 1) - 1; - dest_size = dest_width * 4; + dest_size = dest_stride = dest_width * 4; + src_stride = GST_VIDEO_FRAME_PLANE_STRIDE (&src_frame, 0); #define LINE(x) ((tmpbuf) + (dest_size)*((x)&1))