mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 09:55:36 +00:00
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..
This commit is contained in:
parent
b5b28e2e39
commit
ae957681a7
2 changed files with 20 additions and 13 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2006-01-20 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
|
* gst/gstpad.c: (gst_pad_link_check_compatible_unlocked):
|
||||||
|
Make it actually compile too..
|
||||||
|
|
||||||
2006-01-20 Wim Taymans <wim@fluendo.com>
|
2006-01-20 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
* gst/gstcaps.c:
|
* gst/gstcaps.c:
|
||||||
|
|
28
gst/gstpad.c
28
gst/gstpad.c
|
@ -1507,6 +1507,7 @@ gst_pad_link_check_compatible_unlocked (GstPad * src, GstPad * sink)
|
||||||
{
|
{
|
||||||
GstCaps *srccaps;
|
GstCaps *srccaps;
|
||||||
GstCaps *sinkcaps;
|
GstCaps *sinkcaps;
|
||||||
|
GstCaps *icaps;
|
||||||
|
|
||||||
srccaps = gst_pad_get_caps_unlocked (src);
|
srccaps = gst_pad_get_caps_unlocked (src);
|
||||||
sinkcaps = gst_pad_get_caps_unlocked (sink);
|
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
|
/* if we have caps on both pads we can check the intersection. If one
|
||||||
* of the caps is NULL, we return TRUE. */
|
* of the caps is NULL, we return TRUE. */
|
||||||
if (srccaps && sinkcaps) {
|
if (srccaps == NULL || sinkcaps == NULL)
|
||||||
GstCaps *icaps;
|
goto done;
|
||||||
|
|
||||||
icaps = gst_caps_intersect (srccaps, sinkcaps);
|
icaps = gst_caps_intersect (srccaps, sinkcaps);
|
||||||
gst_caps_unref (srccaps);
|
gst_caps_unref (srccaps);
|
||||||
gst_caps_unref (sinkcaps);
|
gst_caps_unref (sinkcaps);
|
||||||
|
|
||||||
if (icaps == NULL)
|
if (icaps == NULL)
|
||||||
goto was_null;
|
goto was_null;
|
||||||
|
|
||||||
GST_CAT_DEBUG (GST_CAT_CAPS,
|
GST_CAT_DEBUG (GST_CAT_CAPS,
|
||||||
"intersection caps %p %" GST_PTR_FORMAT, icaps, icaps);
|
"intersection caps %p %" GST_PTR_FORMAT, icaps, icaps);
|
||||||
|
|
||||||
if (gst_caps_is_empty (icaps))
|
if (gst_caps_is_empty (icaps))
|
||||||
goto was_empty;
|
goto was_empty;
|
||||||
|
|
||||||
gst_caps_unref (icaps);
|
gst_caps_unref (icaps);
|
||||||
}
|
|
||||||
|
done:
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
/* incompatible cases */
|
/* incompatible cases */
|
||||||
|
|
Loading…
Reference in a new issue