mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 10:41:04 +00:00
audiostreamalign: Don't report disconts for every buffer if alignment-threshold is too small
If it is too small, the maximum allowed diff becomes 0 samples which would then trigger if there is no discontinuity at all. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7888>
This commit is contained in:
parent
da02191411
commit
dce0cdf548
1 changed files with 2 additions and 2 deletions
|
@ -383,9 +383,9 @@ gst_audio_stream_align_process (GstAudioStreamAlign * align,
|
|||
gst_util_uint64_scale (align->next_offset, GST_SECOND,
|
||||
ABS (align->rate));
|
||||
|
||||
max_sample_diff =
|
||||
max_sample_diff = MAX (1,
|
||||
gst_util_uint64_scale_int (align->alignment_threshold,
|
||||
ABS (align->rate), GST_SECOND);
|
||||
ABS (align->rate), GST_SECOND));
|
||||
|
||||
/* Discont! */
|
||||
if (G_UNLIKELY (diff >= max_sample_diff)) {
|
||||
|
|
Loading…
Reference in a new issue