mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
audioaggregator: Read output buffer duration with lock held
This commit is contained in:
parent
6125ea7e97
commit
f8f9c72cc5
1 changed files with 3 additions and 4 deletions
|
@ -1011,10 +1011,6 @@ gst_audio_aggregator_aggregate (GstAggregator * agg, gboolean timeout)
|
|||
element = GST_ELEMENT (agg);
|
||||
aagg = GST_AUDIO_AGGREGATOR (agg);
|
||||
|
||||
blocksize = gst_util_uint64_scale (aagg->priv->output_buffer_duration,
|
||||
GST_AUDIO_INFO_RATE (&aagg->info), GST_SECOND);
|
||||
blocksize = MAX (1, blocksize);
|
||||
|
||||
GST_AUDIO_AGGREGATOR_LOCK (aagg);
|
||||
GST_OBJECT_LOCK (agg);
|
||||
|
||||
|
@ -1062,6 +1058,9 @@ gst_audio_aggregator_aggregate (GstAggregator * agg, gboolean timeout)
|
|||
rate = GST_AUDIO_INFO_RATE (&aagg->info);
|
||||
bpf = GST_AUDIO_INFO_BPF (&aagg->info);
|
||||
|
||||
blocksize = gst_util_uint64_scale (aagg->priv->output_buffer_duration,
|
||||
GST_AUDIO_INFO_RATE (&aagg->info), GST_SECOND);
|
||||
blocksize = MAX (1, blocksize);
|
||||
|
||||
/* for the next timestamp, use the sample counter, which will
|
||||
* never accumulate rounding errors */
|
||||
|
|
Loading…
Reference in a new issue