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/5442>
This commit is contained in:
Guillaume Desmottes 2023-10-06 13:49:15 +02:00
parent 134a66277e
commit dd0896f05a

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 ")",