Merge remote-tracking branch 'origin/0.10'
[platform/upstream/gstreamer.git] / libs / gst / base / gstbasetransform.c
index 87f6016..b5e30e1 100644 (file)
@@ -394,6 +394,7 @@ gst_base_transform_class_init (GstBaseTransformClass * klass)
   gobject_class->finalize = gst_base_transform_finalize;
 
   klass->passthrough_on_same_caps = FALSE;
+  klass->transform_ip_on_passthrough = TRUE;
 
   klass->transform_caps =
       GST_DEBUG_FUNCPTR (gst_base_transform_default_transform_caps);
@@ -957,12 +958,6 @@ gst_base_transform_configure_caps (GstBaseTransform * trans, GstCaps * in,
   priv->have_same_caps = gst_caps_is_equal (in, out);
   GST_DEBUG_OBJECT (trans, "have_same_caps: %d", priv->have_same_caps);
 
-  /* If we've a transform_ip method and same input/output caps, set in_place
-   * by default. If for some reason the sub-class prefers using a transform
-   * function, it can clear the in place flag in the set_caps */
-  gst_base_transform_set_in_place (trans,
-      klass->transform_ip && priv->have_same_caps);
-
   /* Set the passthrough if the class wants passthrough_on_same_caps
    * and we have the same caps on each pad */
   if (klass->passthrough_on_same_caps)
@@ -1092,6 +1087,7 @@ gst_base_transform_find_transform (GstBaseTransform * trans, GstPad * pad,
         gst_caps_unref (othercaps);
         othercaps = intersection;
       } else {
+        gst_caps_unref (othercaps);
         othercaps = peercaps;
       }
 
@@ -2001,8 +1997,8 @@ no_qos:
     /* In passthrough mode, give transform_ip a look at the
      * buffer, without making it writable, or just push the
      * data through */
-    if (bclass->transform_ip) {
-      GST_DEBUG_OBJECT (trans, "doing passthrough transform");
+    if (bclass->transform_ip_on_passthrough && bclass->transform_ip) {
+      GST_DEBUG_OBJECT (trans, "doing passthrough transform_ip");
       ret = bclass->transform_ip (trans, *outbuf);
     } else {
       GST_DEBUG_OBJECT (trans, "element is in passthrough");