diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2015-09-18 18:00:05 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2015-09-18 18:00:05 +0200 |
commit | 3c44d3eca4493b01761f3327064250af821d3296 (patch) | |
tree | cc552e92ac3beefc7b30f4dd5393426a53c7fe69 | |
parent | f02425c4afcd85260a1b387aeddf863774257917 (diff) | |
download | gstreamer-plugins-bad-3c44d3eca4493b01761f3327064250af821d3296.tar.gz |
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.
-rw-r--r-- | gst/audiomixer/gstaudioaggregator.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gst/audiomixer/gstaudioaggregator.c b/gst/audiomixer/gstaudioaggregator.c index 1d3dcb56b..156fa9362 100644 --- a/gst/audiomixer/gstaudioaggregator.c +++ b/gst/audiomixer/gstaudioaggregator.c @@ -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); |