mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-23 06:26:23 +00:00
audioaggregator: Only skip the remaining part of a GAP buffer
We might've queued up a GAP buffer that is only partially inside the current output buffer (i.e. we received it too late!). In that case we should only skip the part of the GAP buffer that is inside the current output buffer, not also the remaining part. Otherwise we forward this pad too far into the future and break synchronization.
This commit is contained in:
parent
f02425c4af
commit
3c44d3eca4
1 changed files with 1 additions and 1 deletions
|
@ -976,7 +976,7 @@ gst_audio_aggregator_mix_buffer (GstAudioAggregator * aagg,
|
|||
if (GST_BUFFER_FLAG_IS_SET (inbuf, GST_BUFFER_FLAG_GAP)) {
|
||||
/* skip gap buffer */
|
||||
GST_LOG_OBJECT (pad, "skipping GAP buffer");
|
||||
pad->priv->output_offset += pad->priv->size;
|
||||
pad->priv->output_offset += pad->priv->size - pad->priv->position;
|
||||
pad->priv->position = pad->priv->size;
|
||||
|
||||
gst_buffer_replace (&pad->priv->buffer, NULL);
|
||||
|
|
Loading…
Reference in a new issue