only call link functions to restore old link if the old link was negotiated

Original commit message from CVS:
only call link functions to restore old link if the old link was negotiated
This commit is contained in:
Benjamin Otte 2003-12-27 15:49:15 +00:00
parent f98a10e5d0
commit a8a68d0c0c

View file

@ -1205,7 +1205,7 @@ gst_pad_link_try (GstPadLink *link)
ret = gst_pad_link_negotiate (link); ret = gst_pad_link_negotiate (link);
if (ret == GST_PAD_LINK_REFUSED) { if (ret == GST_PAD_LINK_REFUSED) {
if (oldlink && !gst_pad_link_call_link_functions (oldlink)) if (oldlink && oldlink->caps && !gst_pad_link_call_link_functions (oldlink))
g_warning ("pads don't accept old caps. We assume they did though"); g_warning ("pads don't accept old caps. We assume they did though");
gst_pad_link_free (link); gst_pad_link_free (link);
return ret; return ret;