From 4525a405d5b00f797e983a7008f29efa75425de6 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Sun, 5 Dec 2010 14:46:28 +0100 Subject: [PATCH] gstcheck: Don't check pad refcount too early Because of the new pad caching system, the peer pad might still have a reference on a pad. We therefore delay the refcount checking til 'after' we unlink the pad from any potential peer. --- libs/gst/check/gstcheck.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libs/gst/check/gstcheck.c b/libs/gst/check/gstcheck.c index 0849dce..77634c2 100644 --- a/libs/gst/check/gstcheck.c +++ b/libs/gst/check/gstcheck.c @@ -244,7 +244,10 @@ gst_check_teardown_pad_by_name (GstElement * element, const gchar * name) /* clean up floating src pad */ pad_element = gst_element_get_static_pad (element, name); - ASSERT_OBJECT_REFCOUNT (pad_element, "pad", 2); + /* We don't check the refcount here since there *might* be + * a pad cache holding an extra reference on pad_element. + * To get to a state where no pad cache will exist, + * we first unlink that pad. */ pad_peer = gst_pad_get_peer (pad_element); if (pad_peer) { -- 2.7.4