videofilter: shortcut transform_ip when not set
authorWim Taymans <wim.taymans@collabora.co.uk>
Sat, 14 Apr 2012 09:26:28 +0000 (11:26 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Sat, 14 Apr 2012 09:26:28 +0000 (11:26 +0200)
We can ask the base class to not call our transform_ip method when the subclass
didn't provide an in-place transform function.

gst-libs/gst/video/gstvideofilter.c

index e36e45d..1eab2b5 100644 (file)
@@ -202,6 +202,8 @@ gst_video_filter_set_caps (GstBaseTransform * trans, GstCaps * incaps,
     filter->out_info = out_info;
     if (fclass->transform_frame == NULL)
       gst_base_transform_set_in_place (trans, TRUE);
+    if (fclass->transform_frame_ip == NULL)
+      GST_BASE_TRANSFORM_CLASS (fclass)->transform_ip_on_passthrough = FALSE;
   }
   filter->negotiated = res;