mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-13 12:51:16 +00:00
GESTimeline: set track state to NULL before removing from timeline
This commit is contained in:
parent
f521d31b40
commit
abce2912b8
1 changed files with 8 additions and 0 deletions
|
@ -774,11 +774,19 @@ ges_timeline_remove_track (GESTimeline * timeline, GESTrack * track)
|
|||
g_signal_emit (timeline, ges_timeline_signals[TRACK_REMOVED], 0, track);
|
||||
|
||||
/* remove track from our bin */
|
||||
gst_object_ref (track);
|
||||
if (G_UNLIKELY (!gst_bin_remove (GST_BIN (timeline), GST_ELEMENT (track)))) {
|
||||
GST_WARNING ("Couldn't remove track to ourself (GST)");
|
||||
gst_object_unref (track);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* set track state to NULL */
|
||||
|
||||
gst_element_set_state (GST_ELEMENT (track), GST_STATE_NULL);
|
||||
|
||||
gst_object_unref (track);
|
||||
|
||||
g_free (priv);
|
||||
|
||||
return TRUE;
|
||||
|
|
Loading…
Reference in a new issue