audiobuffersplit: disable max-silence-time if set to 0

According to the property documentation max-silence-time is supposed to be
disabled when set to 0 but it was not.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5632>
This commit is contained in:
Guillaume Desmottes 2023-10-06 13:49:15 +02:00 committed by Tim-Philipp Müller
parent 8041686539
commit c44e6be7de

View file

@ -572,7 +572,7 @@ gst_audio_buffer_split_handle_discont (GstAudioBufferSplit * self,
GstClockTime silence_time =
gst_util_uint64_scale (silence_samples, GST_SECOND, rate);
if (silence_time > self->max_silence_time) {
if (silence_time > self->max_silence_time && self->max_silence_time != 0) {
GST_DEBUG_OBJECT (self,
"Not inserting %" G_GUINT64_FORMAT " samples of silence (%"
GST_TIME_FORMAT " exceeds maximum %" GST_TIME_FORMAT ")",