mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-18 05:16:05 +00:00
bin: Post a LATENCY message with async-handling=TRUE if the PLAYING state is reached
Otherwise each bin might have a different latency in the end, causing synchronization problems. The bin will still first handle latency internally as before, but gives the overall pipeline the opportunity to update the latency of the whole pipeline afterwards. https://bugzilla.gnome.org/show_bug.cgi?id=759125
This commit is contained in:
parent
d10c488d63
commit
2d427c75ae
1 changed files with 5 additions and 1 deletions
|
@ -2668,14 +2668,18 @@ gst_bin_change_state_func (GstElement * element, GstStateChange transition)
|
|||
switch (next) {
|
||||
case GST_STATE_PLAYING:
|
||||
{
|
||||
gboolean toplevel;
|
||||
gboolean toplevel, asynchandling;
|
||||
|
||||
GST_OBJECT_LOCK (bin);
|
||||
toplevel = BIN_IS_TOPLEVEL (bin);
|
||||
asynchandling = bin->priv->asynchandling;
|
||||
GST_OBJECT_UNLOCK (bin);
|
||||
|
||||
if (toplevel)
|
||||
gst_bin_recalculate_latency (bin);
|
||||
if (asynchandling)
|
||||
gst_element_post_message (element,
|
||||
gst_message_new_latency (GST_OBJECT_CAST (element)));
|
||||
break;
|
||||
}
|
||||
case GST_STATE_PAUSED:
|
||||
|
|
Loading…
Reference in a new issue