The user is responsible to commit the timeline from the right thread
in that case and in the case of gesdemux, the loaded timeline is filling
gaps automatically when the project is set loaded.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/166>
static GstStateChangeReturn
ges_track_change_state (GstElement * element, GstStateChange transition)
{
- if (transition == GST_STATE_CHANGE_READY_TO_PAUSED)
+ GESTrack *track = GES_TRACK (element);
+
+ if (transition == GST_STATE_CHANGE_READY_TO_PAUSED &&
+ track->priv->valid_thread == g_thread_self ())
track_resort_and_fill_gaps (GES_TRACK (element));
return GST_ELEMENT_CLASS (ges_track_parent_class)->change_state (element,