only call link functions to restore old link if the old link was negotiated
authorBenjamin Otte <otte@gnome.org>
Sat, 27 Dec 2003 15:49:15 +0000 (15:49 +0000)
committerBenjamin Otte <otte@gnome.org>
Sat, 27 Dec 2003 15:49:15 +0000 (15:49 +0000)
Original commit message from CVS:
only call link functions to restore old link if the old link was negotiated

gst/gstpad.c

index bfee301..d197d80 100644 (file)
@@ -1205,7 +1205,7 @@ gst_pad_link_try (GstPadLink *link)
   
   ret = gst_pad_link_negotiate (link); 
   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");
     gst_pad_link_free (link);
     return ret;