gst/gstpad.c: Reverting my change according to what we agreed with david.
authorJulien Moutte <julien@moutte.net>
Tue, 17 Feb 2004 22:55:26 +0000 (22:55 +0000)
committerJulien Moutte <julien@moutte.net>
Tue, 17 Feb 2004 22:55:26 +0000 (22:55 +0000)
Original commit message from CVS:
2004-02-17  Julien MOUTTE  <julien@moutte.net>

* gst/gstpad.c: (gst_pad_try_set_caps): Reverting my change according
to what we agreed with david.
* gst/gstpad.h: adding GST_PAD_IS_NEGOTIATING macro.

ChangeLog
gst/gstpad.c
gst/gstpad.h

index a10d18c..49f2f78 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2004-02-17  Julien MOUTTE  <julien@moutte.net>
+
+       * gst/gstpad.c: (gst_pad_try_set_caps): Reverting my change according
+       to what we agreed with david.
+       * gst/gstpad.h: adding GST_PAD_IS_NEGOTIATING macro.
+
 2004-02-17  Thomas Vander Stichele  <thomas at apestaart dot org>
 
        * po/nl.po: update translation
index d70e372..567f0c3 100644 (file)
@@ -1408,10 +1408,7 @@ 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);
-  
-  /* If the pad is negotiating we refuse this try */
-  if (GST_FLAG_IS_SET (pad, GST_PAD_NEGOTIATING))
-    return GST_PAD_LINK_REFUSED;
+  g_return_val_if_fail (!GST_PAD_IS_NEGOTIATING (pad), GST_PAD_LINK_REFUSED);
 
   /* setting non-fixed caps on a pad is not allowed */
   if (!gst_caps_is_fixed (caps)) {
index 691ea5f..c8702a9 100644 (file)
@@ -279,6 +279,7 @@ struct _GstGhostPadClass {
 /* Some check functions (unused?) */
 #define GST_PAD_IS_LINKED(pad)         (GST_PAD_PEER(pad) != NULL)
 #define GST_PAD_IS_ACTIVE(pad)         (!GST_FLAG_IS_SET(GST_PAD_REALIZE(pad), GST_PAD_DISABLED))
+#define GST_PAD_IS_NEGOTIATING(pad)    (GST_FLAG_IS_SET (pad, GST_PAD_NEGOTIATING))
 #define GST_PAD_IS_USABLE(pad)         (GST_PAD_IS_LINKED (pad) && \
                                         GST_PAD_IS_ACTIVE(pad) && GST_PAD_IS_ACTIVE(GST_PAD_PEER (pad)))
 #define GST_PAD_CAN_PULL(pad)          (GST_IS_REAL_PAD(pad) && GST_REAL_PAD(pad)->gethandler != NULL)
@@ -516,4 +517,3 @@ G_END_DECLS
 
 
 #endif /* __GST_PAD_H__ */
-