From ef7a074fa04895208530a2ffd370a8fabb699b2b Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Thu, 6 Aug 2015 18:12:07 -0400 Subject: [PATCH] rgb2bayer: Use mapped frame stride --- gst/bayer/gstrgb2bayer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst/bayer/gstrgb2bayer.c b/gst/bayer/gstrgb2bayer.c index f42a641a35..495f1519c6 100644 --- a/gst/bayer/gstrgb2bayer.c +++ b/gst/bayer/gstrgb2bayer.c @@ -256,7 +256,7 @@ gst_rgb2bayer_transform (GstBaseTransform * trans, GstBuffer * inbuf, for (j = 0; j < height; j++) { guint8 *dest_line = dest + width * j; - guint8 *src_line = src + width * 4 * j; + guint8 *src_line = src + frame.info.stride[0] * j; for (i = 0; i < width; i++) { int is_blue = ((j & 1) << 1) | (i & 1); -- 2.34.1