fsvalve: Make the valve element work with gst < 0.10.13
authorOlivier Crete <olivier.crete@collabora.co.uk>
Fri, 26 Oct 2007 22:37:49 +0000 (22:37 +0000)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Fri, 31 Dec 2010 00:51:09 +0000 (00:51 +0000)
20071026223749-3e2dc-18f685a4e45fbdce677ac777586876fc719d7222.gz

plugins/elements/gstvalve.c

index feeb22f..e33a716 100644 (file)
@@ -197,8 +197,12 @@ gst_valve_transform_ip (GstBaseTransform *trans, GstBuffer *buf)
   GstFlowReturn ret = GST_FLOW_OK;
 
   GST_OBJECT_LOCK (GST_OBJECT (trans));
-  if (valve->drop)
+  if (valve->drop) {
+#if GST_VERSION_MAJOR >= 10 &&  GST_VERSION_MICRO >= 13
     ret = GST_BASE_TRANSFORM_FLOW_DROPPED;
+#endif
+    buf = NULL;
+  }
   GST_OBJECT_UNLOCK (GST_OBJECT (trans));
 
   return ret;