mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 19:20:35 +00:00
composition: Do not remove all sources when stopping task
We only want to remove updates and seek, commits should be kept Co-Authored by: Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
This commit is contained in:
parent
01ee03bc1f
commit
4e84240630
1 changed files with 3 additions and 15 deletions
|
@ -276,20 +276,6 @@ _assert_proper_thread (GnlComposition * comp)
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_remove_all_sources (GnlComposition * comp)
|
||||
{
|
||||
GSource *source;
|
||||
|
||||
MAIN_CONTEXT_LOCK (comp);
|
||||
while ((source =
|
||||
g_main_context_find_source_by_user_data (comp->priv->mcontext,
|
||||
comp))) {
|
||||
g_source_destroy (source);
|
||||
}
|
||||
MAIN_CONTEXT_UNLOCK (comp);
|
||||
}
|
||||
|
||||
static void
|
||||
_destroy_gsource (GSource * source)
|
||||
{
|
||||
|
@ -363,7 +349,6 @@ _stop_task (GnlComposition * comp)
|
|||
|
||||
/* Clean the stack of GSource set on the MainContext */
|
||||
g_main_context_wakeup (comp->priv->mcontext);
|
||||
_remove_all_sources (comp);
|
||||
|
||||
GST_DEBUG_OBJECT (comp, "stop task");
|
||||
|
||||
|
@ -2142,6 +2127,9 @@ gnl_composition_change_state (GstElement * element, GstStateChange transition)
|
|||
break;
|
||||
case GST_STATE_CHANGE_READY_TO_NULL:
|
||||
_stop_task (comp);
|
||||
|
||||
_remove_all_update_sources (comp);
|
||||
_remove_all_seek_sources (comp);
|
||||
_set_all_children_state (comp, GST_STATE_NULL);
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Reference in a new issue