diff --git a/ges/ges-timeline.c b/ges/ges-timeline.c index ac4c2a940d..ba378681cb 100644 --- a/ges/ges-timeline.c +++ b/ges/ges-timeline.c @@ -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;