summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Alexander Steffens (heftig) <jan.steffens@gmail.com>2016-10-09 15:23:51 +0200
committerSebastian Dröge <sebastian@centricular.com>2016-10-20 13:23:30 +0300
commit22ced681af8a27bce0ce59a9db68c902e916390b (patch)
tree043ae2a9aaa0532985d038183c41919ca7f6f39c
parent1950b72e2b6a9b4d2dc6799c0694ab1f5b0c1ef6 (diff)
tests: Fix level test in CK_FORK=no mode
The tests accumulate buffers in GstCheck's buffers list, and the list is not (consistently) reset between tests. Do that and remove the now conflicting unrefs for outbuffers. https://bugzilla.gnome.org/show_bug.cgi?id=772644
-rw-r--r--tests/check/elements/level.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/tests/check/elements/level.c b/tests/check/elements/level.c
index f05370f0f..b17ea167f 100644
--- a/tests/check/elements/level.c
+++ b/tests/check/elements/level.c
@@ -96,6 +96,7 @@ cleanup_level (GstElement * level)
{
GST_DEBUG ("cleanup_level");
+ gst_check_drop_buffers ();
gst_pad_set_active (mysrcpad, FALSE);
gst_pad_set_active (mysinkpad, FALSE);
gst_check_teardown_src_pad (level);
@@ -194,7 +195,6 @@ GST_START_TEST (test_ref_counts)
gst_element_set_bus (level, NULL);
ASSERT_OBJECT_REFCOUNT (bus, "bus", 1);
gst_object_unref (bus);
- gst_buffer_unref (outbuffer);
fail_unless (gst_element_set_state (level,
GST_STATE_NULL) == GST_STATE_CHANGE_SUCCESS, "could not set to null");
ASSERT_OBJECT_REFCOUNT (level, "level", 1);
@@ -241,7 +241,6 @@ GST_START_TEST (test_message_is_valid)
gst_object_unref (bus);
gst_element_set_state (level, GST_STATE_NULL);
cleanup_level (level);
- gst_check_drop_buffers ();
}
GST_END_TEST;
@@ -298,7 +297,6 @@ GST_START_TEST (test_int16)
gst_message_unref (message);
gst_element_set_bus (level, NULL);
gst_object_unref (bus);
- gst_buffer_unref (outbuffer);
gst_element_set_state (level, GST_STATE_NULL);
cleanup_level (level);
}
@@ -377,7 +375,6 @@ GST_START_TEST (test_int16_panned)
gst_bus_set_flushing (bus, TRUE);
gst_element_set_bus (level, NULL);
gst_object_unref (bus);
- gst_buffer_unref (outbuffer);
gst_element_set_state (level, GST_STATE_NULL);
cleanup_level (level);
}
@@ -436,7 +433,6 @@ GST_START_TEST (test_float)
gst_message_unref (message);
gst_element_set_bus (level, NULL);
gst_object_unref (bus);
- gst_buffer_unref (outbuffer);
gst_element_set_state (level, GST_STATE_NULL);
cleanup_level (level);
}
@@ -503,7 +499,6 @@ GST_START_TEST (test_message_on_eos)
gst_message_unref (message);
gst_element_set_bus (level, NULL);
gst_object_unref (bus);
- gst_buffer_unref (outbuffer);
gst_element_set_state (level, GST_STATE_NULL);
cleanup_level (level);
}
@@ -543,7 +538,6 @@ GST_START_TEST (test_message_count)
gst_element_set_bus (level, NULL);
gst_object_unref (bus);
- gst_buffer_unref (outbuffer);
gst_element_set_state (level, GST_STATE_NULL);
cleanup_level (level);
}
@@ -591,7 +585,6 @@ GST_START_TEST (test_message_timestamps)
gst_element_set_bus (level, NULL);
gst_object_unref (bus);
- gst_buffer_unref (outbuffer);
gst_element_set_state (level, GST_STATE_NULL);
cleanup_level (level);
}