mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-27 18:50:48 +00:00
audioaggregator: pass blocksize to mix_buffer()
No need to recalc the value twice per run. Establishes that it is the same value.
This commit is contained in:
parent
afa3b968a0
commit
ea5900d12f
1 changed files with 3 additions and 7 deletions
|
@ -973,19 +973,15 @@ done:
|
|||
|
||||
static gboolean
|
||||
gst_audio_aggregator_mix_buffer (GstAudioAggregator * aagg,
|
||||
GstAudioAggregatorPad * pad, GstBuffer * inbuf, GstBuffer * outbuf)
|
||||
GstAudioAggregatorPad * pad, GstBuffer * inbuf, GstBuffer * outbuf,
|
||||
guint blocksize)
|
||||
{
|
||||
guint overlap;
|
||||
guint out_start;
|
||||
gboolean filled;
|
||||
guint blocksize;
|
||||
guint in_offset;
|
||||
gboolean pad_changed = FALSE;
|
||||
|
||||
blocksize = gst_util_uint64_scale (aagg->priv->output_buffer_duration,
|
||||
GST_AUDIO_INFO_RATE (&aagg->info), GST_SECOND);
|
||||
blocksize = MAX (1, blocksize);
|
||||
|
||||
/* Overlap => mix */
|
||||
if (aagg->priv->offset < pad->priv->output_offset)
|
||||
out_start = pad->priv->output_offset - aagg->priv->offset;
|
||||
|
@ -1295,7 +1291,7 @@ gst_audio_aggregator_aggregate (GstAggregator * agg, gboolean timeout)
|
|||
|
||||
GST_LOG_OBJECT (aggpad, "Mixing buffer for current offset");
|
||||
drop_buf = !gst_audio_aggregator_mix_buffer (aagg, pad, pad->priv->buffer,
|
||||
outbuf);
|
||||
outbuf, blocksize);
|
||||
if (pad->priv->output_offset >= next_offset) {
|
||||
GST_LOG_OBJECT (pad,
|
||||
"Pad is at or after current offset: %" G_GUINT64_FORMAT " >= %"
|
||||
|
|
Loading…
Reference in a new issue