Fix segfault caused by last checkin

Original commit message from CVS:
Fix segfault caused by last checkin
This commit is contained in:
David Schleef 2003-12-30 19:11:03 +00:00
parent cd1d72deb2
commit 1933a78c8e
2 changed files with 12 additions and 4 deletions

View file

@ -1,3 +1,8 @@
2003-12-30 David Schleef <ds@schleef.org>
* gst/gstpad.c: (gst_pad_link_try):
Fix segfault when attempting to return to old caps
2003-12-29 David Schleef <ds@schleef.org>
* gst/gstcaps.c: (gst_caps_normalize), (simplify_foreach),

View file

@ -1205,10 +1205,13 @@ gst_pad_link_try (GstPadLink *link)
ret = gst_pad_link_negotiate (link);
if (ret == GST_PAD_LINK_REFUSED) {
oldlink->srcnotify = link->srcnotify;
oldlink->sinknotify = link->sinknotify;
if (oldlink && oldlink->caps && !gst_pad_link_call_link_functions (oldlink))
g_warning ("pads don't accept old caps. We assume they did though");
if (oldlink && oldlink->caps) {
oldlink->srcnotify = link->srcnotify;
oldlink->sinknotify = link->sinknotify;
if (!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;
}