mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
audiomixer: Only advance by the buffer size when a buffer is late
https://bugzilla.gnome.org/show_bug.cgi?id=745768
This commit is contained in:
parent
25d8f76ecd
commit
3f59bc95b8
1 changed files with 2 additions and 4 deletions
|
@ -1465,11 +1465,9 @@ gst_audiomixer_aggregate (GstAggregator * agg, gboolean timeout)
|
||||||
gint64 diff = audiomixer->offset - pad->output_offset;
|
gint64 diff = audiomixer->offset - pad->output_offset;
|
||||||
gint bpf = GST_AUDIO_INFO_BPF (&audiomixer->info);
|
gint bpf = GST_AUDIO_INFO_BPF (&audiomixer->info);
|
||||||
|
|
||||||
|
if (pad->position + (diff * bpf) > pad->size)
|
||||||
|
diff = (pad->size - pad->position) / bpf;
|
||||||
pad->position += diff * bpf;
|
pad->position += diff * bpf;
|
||||||
if (pad->position > pad->size) {
|
|
||||||
diff = (pad->position - pad->size) / bpf;
|
|
||||||
pad->position = pad->size;
|
|
||||||
}
|
|
||||||
pad->output_offset += diff;
|
pad->output_offset += diff;
|
||||||
|
|
||||||
if (pad->position == pad->size) {
|
if (pad->position == pad->size) {
|
||||||
|
|
Loading…
Reference in a new issue