summaryrefslogtreecommitdiffstats
path: root/tests/check
diff options
context:
space:
mode:
authorThomas Vander Stichele <thomas@apestaart.org>2006-05-22 15:53:07 +0000
committerThomas Vander Stichele <thomas@apestaart.org>2006-05-22 15:53:07 +0000
commita543c648296729f56932d682f92666fab6ed0635 (patch)
tree0c4f7b078e55233bda42426ae5e475197a7e1d16 /tests/check
parent61a524c104f660677f9a5edb68d23b536601cf8d (diff)
downloadgst-plugins-bad-a543c648296729f56932d682f92666fab6ed0635.tar.gz
gst-plugins-bad-a543c648296729f56932d682f92666fab6ed0635.tar.bz2
gst-plugins-bad-a543c648296729f56932d682f92666fab6ed0635.zip
gst/gdp/: Handle error cases when calling functions do downwards state change after parent's change_state
Original commit message from CVS: * gst/gdp/gstgdpdepay.c: (gst_gdp_depay_chain), (gst_gdp_depay_change_state): * gst/gdp/gstgdpdepay.h: * gst/gdp/gstgdppay.c: (gst_gdp_pay_reset_streamheader), (gst_gdp_pay_chain), (gst_gdp_pay_sink_event), (gst_gdp_pay_change_state): * gst/gdp/gstgdppay.h: Handle error cases when calling functions do downwards state change after parent's change_state * tests/check/elements/gdpdepay.c: (GST_START_TEST): * tests/check/elements/gdppay.c: (GST_START_TEST): clean up more
Diffstat (limited to 'tests/check')
-rw-r--r--tests/check/elements/gdpdepay.c9
-rw-r--r--tests/check/elements/gdppay.c12
2 files changed, 21 insertions, 0 deletions
diff --git a/tests/check/elements/gdpdepay.c b/tests/check/elements/gdpdepay.c
index 4e8c9d50..ff24ffdb 100644
--- a/tests/check/elements/gdpdepay.c
+++ b/tests/check/elements/gdpdepay.c
@@ -163,6 +163,9 @@ GST_START_TEST (test_audio_per_byte)
GST_STATE_NULL) == GST_STATE_CHANGE_SUCCESS, "could not set to null");
ASSERT_OBJECT_REFCOUNT (gdpdepay, "gdpdepay", 1);
+ g_list_foreach (buffers, (GFunc) gst_mini_object_unref, NULL);
+ g_list_free (buffers);
+ buffers = NULL;
gst_object_unref (srcpad);
cleanup_gdpdepay (gdpdepay);
}
@@ -232,6 +235,9 @@ GST_START_TEST (test_audio_in_one_buffer)
GST_STATE_NULL) == GST_STATE_CHANGE_SUCCESS, "could not set to null");
gst_object_unref (srcpad);
+ g_list_foreach (buffers, (GFunc) gst_mini_object_unref, NULL);
+ g_list_free (buffers);
+ buffers = NULL;
ASSERT_OBJECT_REFCOUNT (gdpdepay, "gdpdepay", 1);
cleanup_gdpdepay (gdpdepay);
}
@@ -361,6 +367,9 @@ GST_START_TEST (test_streamheader)
GST_STATE_NULL) == GST_STATE_CHANGE_SUCCESS, "could not set to null");
gst_object_unref (srcpad);
+ g_list_foreach (buffers, (GFunc) gst_mini_object_unref, NULL);
+ g_list_free (buffers);
+ buffers = NULL;
ASSERT_OBJECT_REFCOUNT (gdpdepay, "gdpdepay", 1);
cleanup_gdpdepay (gdpdepay);
}
diff --git a/tests/check/elements/gdppay.c b/tests/check/elements/gdppay.c
index 5915ef32..6c117598 100644
--- a/tests/check/elements/gdppay.c
+++ b/tests/check/elements/gdppay.c
@@ -193,6 +193,9 @@ GST_START_TEST (test_audio)
gst_caps_unref (caps);
g_free (caps_string);
+ g_list_foreach (buffers, (GFunc) gst_mini_object_unref, NULL);
+ g_list_free (buffers);
+ buffers = NULL;
ASSERT_OBJECT_REFCOUNT (gdppay, "gdppay", 1);
gst_object_unref (gdppay);
}
@@ -362,6 +365,9 @@ GST_START_TEST (test_streamheader)
gst_caps_unref (caps);
g_free (caps_string);
+ g_list_foreach (buffers, (GFunc) gst_mini_object_unref, NULL);
+ g_list_free (buffers);
+ buffers = NULL;
ASSERT_OBJECT_REFCOUNT (gdppay, "gdppay", 1);
gst_object_unref (gdppay);
}
@@ -392,6 +398,9 @@ GST_START_TEST (test_first_no_caps)
fail_unless (gst_element_set_state (gdppay,
GST_STATE_NULL) == GST_STATE_CHANGE_SUCCESS, "could not set to null");
+ g_list_foreach (buffers, (GFunc) gst_mini_object_unref, NULL);
+ g_list_free (buffers);
+ buffers = NULL;
ASSERT_OBJECT_REFCOUNT (gdppay, "gdppay", 1);
gst_object_unref (gdppay);
}
@@ -430,6 +439,9 @@ GST_START_TEST (test_first_no_new_segment)
fail_unless (gst_element_set_state (gdppay,
GST_STATE_NULL) == GST_STATE_CHANGE_SUCCESS, "could not set to null");
+ g_list_foreach (buffers, (GFunc) gst_mini_object_unref, NULL);
+ g_list_free (buffers);
+ buffers = NULL;
ASSERT_OBJECT_REFCOUNT (gdppay, "gdppay", 1);
gst_object_unref (gdppay);
}