libs/gst/base/gstbasetransform.c: Rename a variable to make the code clearer.
authorWim Taymans <wim.taymans@gmail.com>
Sat, 22 Nov 2008 15:09:20 +0000 (15:09 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Sat, 22 Nov 2008 15:09:20 +0000 (15:09 +0000)
Original commit message from CVS:
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_acceptcaps):
Rename a variable to make the code clearer.

ChangeLog
libs/gst/base/gstbasetransform.c

index fd02d74..2fda3ce 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-11-22  Wim Taymans  <wim.taymans@collabora.co.uk>
+
+       * libs/gst/base/gstbasetransform.c:
+       (gst_base_transform_acceptcaps):
+       Rename a variable to make the code clearer.
+
 2008-11-21  Stefan Kost  <ensonic@users.sf.net>
 
        * plugins/elements/gstidentity.c:
index 6daf70e..140a3fe 100644 (file)
@@ -982,20 +982,24 @@ gst_base_transform_acceptcaps (GstPad * pad, GstCaps * caps)
   /* we need fixed caps for the check, fall back to the default implementation
    * if we don't */
   if (!gst_caps_is_fixed (caps)) {
-    GstCaps *intersect;
+    GstCaps *allowed, *intersect;
 
     GST_DEBUG_OBJECT (pad, "non fixed accept caps %" GST_PTR_FORMAT, caps);
 
-    othercaps = gst_pad_get_caps (pad);
-    if (!othercaps)
+    /* get all the formats we can handle on this pad */
+    allowed = gst_pad_get_caps (pad);
+    if (!allowed)
       goto no_transform_possible;
 
-    intersect = gst_caps_intersect (othercaps, caps);
+    /* intersect with the requested format */
+    intersect = gst_caps_intersect (allowed, caps);
 
     GST_DEBUG_OBJECT (pad, "intersection %" GST_PTR_FORMAT, intersect);
 
+    /* we can accept if the intersection is not empty  */
     ret = !gst_caps_is_empty (intersect);
     gst_caps_unref (intersect);
+    gst_caps_unref (allowed);
 
     if (!ret)
       goto no_transform_possible;