summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2023-04-22 11:42:36 +0300
committerTim-Philipp Müller <tim@centricular.com>2023-05-06 20:22:19 +0100
commit694ad96545aedfaf2b859b57638dc7455c6e17ae (patch)
treed15b77fdae7b9e03ef13432bc0e63c709ac7afc7
parentf97e0d9777346e95c7f617ff719689f444ee259c (diff)
audiotestsrc: Initialize all samples in wave=ticks mode
Previously samples were only initialized in 2 out of 3 cases. Probably fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/337 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4564>
-rw-r--r--subprojects/gst-plugins-base/gst/audiotestsrc/gstaudiotestsrc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/subprojects/gst-plugins-base/gst/audiotestsrc/gstaudiotestsrc.c b/subprojects/gst-plugins-base/gst/audiotestsrc/gstaudiotestsrc.c
index a15fe5b148..27707b5cd5 100644
--- a/subprojects/gst-plugins-base/gst/audiotestsrc/gstaudiotestsrc.c
+++ b/subprojects/gst-plugins-base/gst/audiotestsrc/gstaudiotestsrc.c
@@ -953,6 +953,10 @@ gst_audio_test_src_create_tick_##type (GstAudioTestSrc * src, g##type * samples)
src->accumulator = 0; \
src->tick_counter++; \
volscale = calc_scaled_tick_volume (src, scale); \
+ for (c = 0; c < channels; ++c) { \
+ *ptr = 0; \
+ ptr += channel_step; \
+ } \
} else if (samplemod < num_nonzero_samples) { \
gdouble ramp; \
if (num_ramp_samples > 0) { \