pad: small cleanup
authorWim Taymans <wim.taymans@collabora.co.uk>
Thu, 8 Mar 2012 08:44:21 +0000 (09:44 +0100)
committerWim Taymans <wim.taymans@collabora.co.uk>
Thu, 8 Mar 2012 09:34:41 +0000 (10:34 +0100)
gst/gstpad.c

index 2315bba..1c33abb 100644 (file)
@@ -454,6 +454,7 @@ schedule_events (GstPad * srcpad, GstPad * sinkpad)
 typedef gboolean (*PadEventFunction) (GstPad * pad, PadEvent * ev,
     gpointer user_data);
 
+/* should be called with pad LOCK */
 static void
 events_foreach (GstPad * pad, PadEventFunction func, gpointer user_data)
 {
@@ -2268,14 +2269,12 @@ gst_pad_set_caps (GstPad * pad, GstCaps * caps)
 GstCaps *
 gst_pad_get_pad_template_caps (GstPad * pad)
 {
-  static GstStaticCaps anycaps = GST_STATIC_CAPS ("ANY");
-
   g_return_val_if_fail (GST_IS_PAD (pad), NULL);
 
   if (GST_PAD_PAD_TEMPLATE (pad))
     return gst_pad_template_get_caps (GST_PAD_PAD_TEMPLATE (pad));
 
-  return gst_static_caps_get (&anycaps);
+  return gst_caps_ref (GST_CAPS_ANY);
 }
 
 /**