diff --git a/ChangeLog b/ChangeLog index 69fe474cb2..7f2e152daa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2004-10-11 Benjamin Otte + + * gst/gstpad.c: (gst_pad_renegotiate), (gst_pad_try_set_caps), + (gst_pad_try_set_caps_nonfixed): + allow renegotiation of unconnected pads (as inside spider). Simply + return OK if unconnected - mimic try_set_caps there. + 2004-10-09 Ronald S. Bultje * gst/gstbin.c: (gst_bin_sync_children_state): @@ -197,6 +204,7 @@ * gst/elements/gstidentity.h: Added datarate properties to limit the datarate. +>>>>>>> 1.808 2004-08-25 Benjamin Otte * gst/autoplug/gstspider.c: (plugin_init): diff --git a/gst/gstpad.c b/gst/gstpad.c index d6e4270be8..f801cbc31e 100644 --- a/gst/gstpad.c +++ b/gst/gstpad.c @@ -1430,8 +1430,8 @@ gst_pad_renegotiate (GstPad * pad) GstPadLink *link; g_return_val_if_fail (GST_IS_PAD (pad), GST_PAD_LINK_REFUSED); - g_return_val_if_fail (GST_PAD_LINK_SRC (pad), GST_PAD_LINK_REFUSED); - g_return_val_if_fail (GST_PAD_LINK_SINK (pad), GST_PAD_LINK_REFUSED); + if (!GST_PAD_PEER (pad)) + return GST_PAD_LINK_OK; link = gst_pad_link_new (); @@ -1503,8 +1503,9 @@ gst_pad_try_set_caps (GstPad * pad, const GstCaps * caps) return GST_PAD_LINK_OK; } - g_return_val_if_fail (GST_PAD_LINK_SRC (pad), GST_PAD_LINK_REFUSED); - g_return_val_if_fail (GST_PAD_LINK_SINK (pad), GST_PAD_LINK_REFUSED); + /* we just checked that a peer exists */ + g_assert (GST_PAD_LINK_SRC (pad)); + g_assert (GST_PAD_LINK_SINK (pad)); /* if the desired caps are already there, it's trivially ok */ if (GST_PAD_CAPS (pad) && gst_caps_is_equal (caps, GST_PAD_CAPS (pad))) { @@ -1567,8 +1568,9 @@ gst_pad_try_set_caps_nonfixed (GstPad * pad, const GstCaps * caps) return GST_PAD_LINK_OK; } - g_return_val_if_fail (GST_PAD_LINK_SRC (pad), GST_PAD_LINK_REFUSED); - g_return_val_if_fail (GST_PAD_LINK_SINK (pad), GST_PAD_LINK_REFUSED); + /* we just checked that a peer exists */ + g_assert (GST_PAD_LINK_SRC (pad)); + g_assert (GST_PAD_LINK_SINK (pad)); /* if the link is already negotiated and the caps are compatible * with what we're setting, it's trivially OK. */