From ae957681a7adaa6f983b5b3a080bedbf90f3f8dc Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 20 Jan 2006 09:56:38 +0000 Subject: [PATCH] gst/gstpad.c: Make it actually compile too.. Original commit message from CVS: * gst/gstpad.c: (gst_pad_link_check_compatible_unlocked): Make it actually compile too.. --- ChangeLog | 5 +++++ gst/gstpad.c | 28 +++++++++++++++------------- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index f917bd1edf..f73475eabf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-01-20 Wim Taymans + + * gst/gstpad.c: (gst_pad_link_check_compatible_unlocked): + Make it actually compile too.. + 2006-01-20 Wim Taymans * gst/gstcaps.c: diff --git a/gst/gstpad.c b/gst/gstpad.c index a1e9993bea..9f00301fad 100644 --- a/gst/gstpad.c +++ b/gst/gstpad.c @@ -1507,6 +1507,7 @@ gst_pad_link_check_compatible_unlocked (GstPad * src, GstPad * sink) { GstCaps *srccaps; GstCaps *sinkcaps; + GstCaps *icaps; srccaps = gst_pad_get_caps_unlocked (src); sinkcaps = gst_pad_get_caps_unlocked (sink); @@ -1516,24 +1517,25 @@ gst_pad_link_check_compatible_unlocked (GstPad * src, GstPad * sink) /* if we have caps on both pads we can check the intersection. If one * of the caps is NULL, we return TRUE. */ - if (srccaps && sinkcaps) { - GstCaps *icaps; + if (srccaps == NULL || sinkcaps == NULL) + goto done; - icaps = gst_caps_intersect (srccaps, sinkcaps); - gst_caps_unref (srccaps); - gst_caps_unref (sinkcaps); + icaps = gst_caps_intersect (srccaps, sinkcaps); + gst_caps_unref (srccaps); + gst_caps_unref (sinkcaps); - if (icaps == NULL) - goto was_null; + if (icaps == NULL) + goto was_null; - GST_CAT_DEBUG (GST_CAT_CAPS, - "intersection caps %p %" GST_PTR_FORMAT, icaps, icaps); + GST_CAT_DEBUG (GST_CAT_CAPS, + "intersection caps %p %" GST_PTR_FORMAT, icaps, icaps); - if (gst_caps_is_empty (icaps)) - goto was_empty; + if (gst_caps_is_empty (icaps)) + goto was_empty; - gst_caps_unref (icaps); - } + gst_caps_unref (icaps); + +done: return TRUE; /* incompatible cases */