tests: Add missing unrefs of objects after use

Unreffing the objects returned by gst_bin_get_by_name() and
gst_pipeline_get_use() were missing in several tests, so add these.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734345
This commit is contained in:
Sebastian Rasmussen 2014-08-06 12:34:42 +02:00 committed by Sebastian Dröge
parent fd14754921
commit 4cf6a6e086
4 changed files with 5 additions and 0 deletions

View file

@ -59,6 +59,7 @@ main (int argc, char *argv[])
filesrc = gst_bin_get_by_name (GST_BIN (pipeline), "my_filesrc");
g_object_set (filesrc, "location", argv[1], NULL);
g_object_unref (filesrc);
gst_element_set_state (pipeline, GST_STATE_PLAYING);

View file

@ -201,6 +201,7 @@ GST_START_TEST (test_eos)
gst_pad_set_active (pad2, FALSE);
gst_check_teardown_src_pad (sink1);
gst_check_teardown_src_pad (sink2);
gst_object_unref (bus);
gst_object_unref (pipeline);
}
@ -259,6 +260,7 @@ GST_START_TEST (test_stream_start)
gst_pad_set_active (pad2, FALSE);
gst_check_teardown_src_pad (sink1);
gst_check_teardown_src_pad (sink2);
gst_object_unref (bus);
gst_object_unref (pipeline);
}

View file

@ -467,6 +467,7 @@ run_delayed_test (const gchar * pipe_str, const gchar * peer,
fail_if (peer_elem == NULL, "Could not retrieve peer %s", peer);
sinkpad = gst_element_get_static_pad (peer_elem, "sink");
gst_object_unref (peer_elem);
fail_if (sinkpad == NULL, "Peer element did not have a 'sink' pad");
fail_unless (peerpad == sinkpad,

View file

@ -72,6 +72,7 @@ main (int argc, char *argv[])
filesrc = gst_bin_get_by_name (GST_BIN (bin), "my_filesrc");
g_object_set (G_OBJECT (filesrc), "location", argv[1], NULL);
gst_object_unref (filesrc);
/* start playing */
gst_element_set_state (bin, GST_STATE_PLAYING);