gst/gstpad.c: We are nice people. Return silently when the pad is negotiating.
authorJulien Moutte <julien@moutte.net>
Mon, 16 Feb 2004 23:40:32 +0000 (23:40 +0000)
committerJulien Moutte <julien@moutte.net>
Mon, 16 Feb 2004 23:40:32 +0000 (23:40 +0000)
Original commit message from CVS:
2004-02-17  Julien MOUTTE  <julien@moutte.net>

* gst/gstpad.c: (gst_pad_try_set_caps): We are nice people. Return
silently when the pad is negotiating.

ChangeLog
gst/gstpad.c

index 37aafa4..574aa15 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-02-17  Julien MOUTTE  <julien@moutte.net>
+
+       * gst/gstpad.c: (gst_pad_try_set_caps): We are nice people. Return 
+       silently when the pad is negotiating.
+
 2004-02-16  Thomas Vander Stichele  <thomas at apestaart dot org>
 
        * docs/faq/Makefile.am:
index 4247750..d70e372 100644 (file)
@@ -1408,8 +1408,10 @@ gst_pad_try_set_caps (GstPad *pad, const GstCaps *caps)
 
   g_return_val_if_fail (pad != NULL, GST_PAD_LINK_REFUSED);
   g_return_val_if_fail (GST_IS_REAL_PAD (pad), GST_PAD_LINK_REFUSED);
-  g_return_val_if_fail (!GST_FLAG_IS_SET (pad, GST_PAD_NEGOTIATING),
-      GST_PAD_LINK_REFUSED);
+  
+  /* If the pad is negotiating we refuse this try */
+  if (GST_FLAG_IS_SET (pad, GST_PAD_NEGOTIATING))
+    return GST_PAD_LINK_REFUSED;
 
   /* setting non-fixed caps on a pad is not allowed */
   if (!gst_caps_is_fixed (caps)) {