framepositionner: Add a weak pointer to the track_source
authorThibault Saunier <tsaunier@gnome.org>
Fri, 19 Sep 2014 10:28:05 +0000 (12:28 +0200)
committerThibault Saunier <tsaunier@gnome.org>
Fri, 31 Oct 2014 10:58:12 +0000 (11:58 +0100)
Avoiding assertions when the object is destroyed.

ges/gstframepositionner.c

index 0d4372534756155e956af0edf0828d87013f4690..bfc111a36286fe8ff5dd7dddc412ced859398c97 100644 (file)
@@ -197,6 +197,9 @@ ges_frame_positionner_set_source_and_filter (GstFramePositionner * pos,
   pos->track_source = trksrc;
   pos->capsfilter = capsfilter;
   pos->current_track = ges_track_element_get_track (trksrc);
+
+  g_object_add_weak_pointer (G_OBJECT (pos->track_source),
+      ((gpointer *) & pos->track_source));
   g_object_weak_ref (G_OBJECT (pos->current_track),
       (GWeakNotify) _weak_notify_cb, pos);