mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-14 05:12:09 +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);
|
g_signal_emit (timeline, ges_timeline_signals[TRACK_REMOVED], 0, track);
|
||||||
|
|
||||||
/* remove track from our bin */
|
/* remove track from our bin */
|
||||||
|
gst_object_ref (track);
|
||||||
if (G_UNLIKELY (!gst_bin_remove (GST_BIN (timeline), GST_ELEMENT (track)))) {
|
if (G_UNLIKELY (!gst_bin_remove (GST_BIN (timeline), GST_ELEMENT (track)))) {
|
||||||
GST_WARNING ("Couldn't remove track to ourself (GST)");
|
GST_WARNING ("Couldn't remove track to ourself (GST)");
|
||||||
|
gst_object_unref (track);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* set track state to NULL */
|
||||||
|
|
||||||
|
gst_element_set_state (GST_ELEMENT (track), GST_STATE_NULL);
|
||||||
|
|
||||||
|
gst_object_unref (track);
|
||||||
|
|
||||||
g_free (priv);
|
g_free (priv);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
Loading…
Reference in a new issue