composition: Fix toplevel seek event refcounting
authorMathieu Duponchelle <mathieu.duponchelle@opencreed.com>
Thu, 3 Jul 2014 15:36:01 +0000 (17:36 +0200)
committerThibault Saunier <tsaunier@gnome.org>
Fri, 31 Oct 2014 10:58:08 +0000 (11:58 +0100)
Co-Authored by: Thibault Saunier <tsaunier@gnome.org>

gnl/gnlcomposition.c
gnl/gnlghostpad.c
tests/check/gnl/gnlcomposition.c

index 6ceefe6..d9bf60a 100644 (file)
@@ -2526,6 +2526,7 @@ compare_relink_stack (GnlComposition * comp, GNode * stack, gboolean modify)
 
 
   _relink_single_node (comp, stack, toplevel_seek);
+  gst_event_unref (toplevel_seek);
 
   gst_element_set_locked_state (comp->priv->current_bin, FALSE);
   gst_element_sync_state_with_parent (comp->priv->current_bin);
index 2a7333e..73e960b 100644 (file)
@@ -120,8 +120,6 @@ gnl_object_translate_incoming_seek (GnlObject * object, GstEvent * event)
       ncurtype, (gint64) ncur, GST_SEEK_TYPE_SET, (gint64) nstop);
   GST_EVENT_SEQNUM (event2) = seqnum;
 
-  gst_event_unref (event);
-
   return event2;
 
   /* ERRORS */
index 3d6bfe5..ef09b4f 100644 (file)
@@ -94,7 +94,7 @@ GST_START_TEST (test_change_object_start_stop_in_current_stack)
   bus = gst_element_get_bus (GST_ELEMENT (pipeline));
 
   GST_DEBUG ("Setting pipeline to PLAYING");
-  ASSERT_OBJECT_REFCOUNT (source1, "source1", 3);
+  ASSERT_OBJECT_REFCOUNT (source1, "source1", 2);
 
   fail_if (gst_element_set_state (GST_ELEMENT (pipeline),
           GST_STATE_PAUSED) == GST_STATE_CHANGE_FAILURE);