From 1c36c03001e07aa299dba00fe542b91ebfa4c2db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sat, 28 Mar 2009 10:40:43 +0100 Subject: [PATCH] videotestsrc: Initialize buffer memory with zeroes This prevents valgrind warnings when accessing the "x" parts of xRGB and friends in other elements that handle (and can handle) xRGB like ARGB (for example videoscale). --- gst/videotestsrc/gstvideotestsrc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gst/videotestsrc/gstvideotestsrc.c b/gst/videotestsrc/gstvideotestsrc.c index fc5133a688..807223443d 100644 --- a/gst/videotestsrc/gstvideotestsrc.c +++ b/gst/videotestsrc/gstvideotestsrc.c @@ -771,6 +771,8 @@ gst_video_test_src_create (GstPushSrc * psrc, GstBuffer ** buffer) gst_buffer_set_caps (outbuf, GST_PAD_CAPS (GST_BASE_SRC_PAD (psrc))); } + memset (GST_BUFFER_DATA (outbuf), 0, GST_BUFFER_SIZE (outbuf)); + if (src->pattern_type == GST_VIDEO_TEST_SRC_BLINK) { if (src->n_frames & 0x1) { gst_video_test_src_white (src, (void *) GST_BUFFER_DATA (outbuf),