From f51bed2a3b813741fdb627eb61b22aadac618e57 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 13 Nov 2014 12:02:07 +0100 Subject: [PATCH] video-converter: don't convert too much because we do conversion after downscaling we only need to convert the smallest width. --- gst-libs/gst/video/video-converter.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gst-libs/gst/video/video-converter.c b/gst-libs/gst/video/video-converter.c index 3c657dd91c..1d51e638e2 100644 --- a/gst-libs/gst/video/video-converter.c +++ b/gst-libs/gst/video/video-converter.c @@ -1051,8 +1051,9 @@ video_converter_matrix16 (GstVideoConverter * convert, gpointer pixels) int r, g, b; int y, u, v; guint16 *p = pixels; + gint width = MIN (convert->in_width, convert->out_width); - for (i = 0; i < convert->in_width; i++) { + for (i = 0; i < width; i++) { r = p[i * 4 + 1]; g = p[i * 4 + 2]; b = p[i * 4 + 3];