mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
aggregator: Reset upstream latency on first buffer
In the case an aggregator is created and pads are requested but only linked later, we end up never updating the upstream latency. This was because latency queries on pads that are not linked succeed, so we never did a new query once a live source has been linked, so the thread was never started. https://bugzilla.gnome.org/show_bug.cgi?id=757548
This commit is contained in:
parent
39d2526c34
commit
ed8512c53e
1 changed files with 6 additions and 3 deletions
|
@ -1390,7 +1390,6 @@ gst_aggregator_request_new_pad (GstElement * element,
|
|||
}
|
||||
|
||||
GST_DEBUG_OBJECT (element, "Adding pad %s", GST_PAD_NAME (agg_pad));
|
||||
self->priv->has_peer_latency = FALSE;
|
||||
|
||||
if (priv->running)
|
||||
gst_pad_set_active (GST_PAD (agg_pad), TRUE);
|
||||
|
@ -2165,12 +2164,16 @@ gst_aggregator_pad_chain_internal (GstAggregator * self,
|
|||
|
||||
buf_pts = GST_BUFFER_PTS (buffer);
|
||||
|
||||
aggpad->priv->first_buffer = FALSE;
|
||||
|
||||
for (;;) {
|
||||
SRC_LOCK (self);
|
||||
GST_OBJECT_LOCK (self);
|
||||
PAD_LOCK (aggpad);
|
||||
|
||||
if (aggpad->priv->first_buffer) {
|
||||
self->priv->has_peer_latency = FALSE;
|
||||
aggpad->priv->first_buffer = FALSE;
|
||||
}
|
||||
|
||||
if (gst_aggregator_pad_has_space (self, aggpad)
|
||||
&& aggpad->priv->flow_return == GST_FLOW_OK) {
|
||||
if (head)
|
||||
|
|
Loading…
Reference in a new issue