check/gst/gstpad.c (test_get_allowed_caps, test_refcount): Fix borken refcounting.
authorAndy Wingo <wingo@pobox.com>
Thu, 23 Jun 2005 09:59:33 +0000 (09:59 +0000)
committerAndy Wingo <wingo@pobox.com>
Thu, 23 Jun 2005 09:59:33 +0000 (09:59 +0000)
Original commit message from CVS:
2005-06-23  Andy Wingo  <wingo@pobox.com>

* check/gst/gstpad.c (test_get_allowed_caps, test_refcount): Fix
borken refcounting.

ChangeLog
check/gst/gstpad.c
tests/check/gst/gstpad.c

index bec89ae..d05186d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2005-06-23  Andy Wingo  <wingo@pobox.com>
 
+       * check/gst/gstpad.c (test_get_allowed_caps, test_refcount): Fix
+       borken refcounting.
+
        * gst/gstpad.c (gst_pad_set_caps): Remove needless refs,
        gst_caps_replace takes care of this for us.
 
index ba686bf..0b257a5 100644 (file)
@@ -106,9 +106,7 @@ START_TEST (test_refcount)
   ASSERT_CAPS_REFCOUNT (caps, "caps", 1);
 
   gst_pad_set_caps (src, caps);
-  gst_caps_unref (caps);
   gst_pad_set_caps (sink, caps);
-  gst_caps_unref (caps);
   /* one for me and one for each set_caps */
   ASSERT_CAPS_REFCOUNT (caps, "caps", 3);
 
@@ -134,7 +132,6 @@ START_TEST (test_get_allowed_caps)
   GstCaps *caps, *gotcaps;
   GstBuffer *buffer;
   GstPadLinkReturn plr;
-  int rc;
 
   ASSERT_CRITICAL (gst_pad_get_allowed_caps (NULL));
 
@@ -151,12 +148,9 @@ START_TEST (test_get_allowed_caps)
   fail_unless (caps == NULL);
 
   caps = gst_caps_new_any ();
-  rc = GST_MINI_OBJECT_REFCOUNT_VALUE (caps);
 
   gst_pad_set_caps (src, caps);
-  gst_caps_unref (caps);
   gst_pad_set_caps (sink, caps);
-  gst_caps_unref (caps);
   ASSERT_CAPS_REFCOUNT (caps, "caps", 3);
 
   plr = gst_pad_link (src, sink);
@@ -183,7 +177,8 @@ START_TEST (test_get_allowed_caps)
   gst_caps_unref (caps);
 }
 
-END_TEST Suite * gst_pad_suite (void)
+END_TEST Suite *
+gst_pad_suite (void)
 {
   Suite *s = suite_create ("GstPad");
   TCase *tc_chain = tcase_create ("general");
index ba686bf..0b257a5 100644 (file)
@@ -106,9 +106,7 @@ START_TEST (test_refcount)
   ASSERT_CAPS_REFCOUNT (caps, "caps", 1);
 
   gst_pad_set_caps (src, caps);
-  gst_caps_unref (caps);
   gst_pad_set_caps (sink, caps);
-  gst_caps_unref (caps);
   /* one for me and one for each set_caps */
   ASSERT_CAPS_REFCOUNT (caps, "caps", 3);
 
@@ -134,7 +132,6 @@ START_TEST (test_get_allowed_caps)
   GstCaps *caps, *gotcaps;
   GstBuffer *buffer;
   GstPadLinkReturn plr;
-  int rc;
 
   ASSERT_CRITICAL (gst_pad_get_allowed_caps (NULL));
 
@@ -151,12 +148,9 @@ START_TEST (test_get_allowed_caps)
   fail_unless (caps == NULL);
 
   caps = gst_caps_new_any ();
-  rc = GST_MINI_OBJECT_REFCOUNT_VALUE (caps);
 
   gst_pad_set_caps (src, caps);
-  gst_caps_unref (caps);
   gst_pad_set_caps (sink, caps);
-  gst_caps_unref (caps);
   ASSERT_CAPS_REFCOUNT (caps, "caps", 3);
 
   plr = gst_pad_link (src, sink);
@@ -183,7 +177,8 @@ START_TEST (test_get_allowed_caps)
   gst_caps_unref (caps);
 }
 
-END_TEST Suite * gst_pad_suite (void)
+END_TEST Suite *
+gst_pad_suite (void)
 {
   Suite *s = suite_create ("GstPad");
   TCase *tc_chain = tcase_create ("general");