mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
aggregator: fix input buffering
We need to be able to buffer at least the aggregator latency + upstream latency, which is the value used to compute the aggregator deadline. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3138>
This commit is contained in:
parent
56eb44c502
commit
2df2dfce55
1 changed files with 5 additions and 5 deletions
|
@ -3007,14 +3007,14 @@ gst_aggregator_pad_has_space (GstAggregator * self, GstAggregatorPad * aggpad)
|
||||||
if (self->priv->peer_latency_live && aggpad->priv->num_buffers < 2)
|
if (self->priv->peer_latency_live && aggpad->priv->num_buffers < 2)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
/* zero latency, if there is a buffer, it's full */
|
|
||||||
if (self->priv->latency == 0)
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
/* On top of our latency, we also want to allow buffering up to the
|
/* On top of our latency, we also want to allow buffering up to the
|
||||||
* minimum upstream latency to allow queue free sources with lower then
|
* minimum upstream latency to allow queue free sources with lower then
|
||||||
* upstream latency. */
|
* upstream latency. */
|
||||||
max_time_level = self->priv->latency + self->priv->upstream_latency_min;
|
max_time_level = self->priv->latency + self->priv->peer_latency_min;
|
||||||
|
|
||||||
|
/* zero latency, if there is a buffer, it's full */
|
||||||
|
if (max_time_level == 0)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
GST_TRACE_OBJECT (aggpad, "Maximum queue level %" GST_TIME_FORMAT,
|
GST_TRACE_OBJECT (aggpad, "Maximum queue level %" GST_TIME_FORMAT,
|
||||||
GST_TIME_ARGS (max_time_level));
|
GST_TIME_ARGS (max_time_level));
|
||||||
|
|
Loading…
Reference in a new issue