libs/gst/base/gstbasetransform.c: Forgot to remove two unneeded unrefs.
authorWim Taymans <wim.taymans@gmail.com>
Thu, 22 Jun 2006 15:12:50 +0000 (15:12 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Thu, 22 Jun 2006 15:12:50 +0000 (15:12 +0000)
Original commit message from CVS:
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_buffer_alloc):
Forgot to remove two unneeded unrefs.
Simplify a check _is_equal allready checks the obvious case.

ChangeLog
libs/gst/base/gstbasetransform.c

index fcbc979..32c53e5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2006-06-22  Wim Taymans  <wim@fluendo.com>
 
+       * libs/gst/base/gstbasetransform.c:
+       (gst_base_transform_buffer_alloc):
+       Forgot to remove two unneeded unrefs.
+       Simplify a check _is_equal allready checks the obvious case.
+
+2006-06-22  Wim Taymans  <wim@fluendo.com>
+
        * docs/design/part-block.txt:
        Some docs about what pad_block should do.
 
index ada3cf2..ad3c23d 100644 (file)
@@ -1049,13 +1049,8 @@ gst_base_transform_buffer_alloc (GstPad * pad, guint64 offset, guint size,
       goto not_configured;
 
     sinkcaps = GST_PAD_CAPS (trans->sinkpad);
-    if (sinkcaps != NULL) {
-      if (sinkcaps != caps || !gst_caps_is_equal (sinkcaps, caps)) {
-        gst_caps_unref (sinkcaps);
-        gst_caps_unref (srccaps);
-        goto not_configured;
-      }
-    }
+    if (sinkcaps != NULL && !gst_caps_is_equal (sinkcaps, caps))
+      goto not_configured;
 
     GST_DEBUG_OBJECT (trans, "calling transform_size");
     if (!gst_base_transform_transform_size (trans,
@@ -1082,7 +1077,6 @@ gst_base_transform_buffer_alloc (GstPad * pad, guint64 offset, guint size,
       goto not_configured;
 
     srccaps = GST_PAD_CAPS (trans->srcpad);
-
     if (!gst_base_transform_transform_size (trans,
             GST_PAD_DIRECTION (trans->srcpad), srccaps, GST_BUFFER_SIZE (*buf),
             sinkcaps, &new_size))