caps: fix some 0.11 FIXMEs

This commit is contained in:
Wim Taymans 2012-03-12 12:35:07 +01:00
parent 67931bfded
commit 4feb6c3989

View file

@ -1047,18 +1047,12 @@ gst_caps_is_subset_structure (const GstCaps * caps,
gboolean
gst_caps_is_equal (const GstCaps * caps1, const GstCaps * caps2)
{
/* FIXME 0.11: NULL pointers are no valid Caps but indicate an error
* So there should be an assertion that caps1 and caps2 != NULL */
g_return_val_if_fail (GST_IS_CAPS (caps1), FALSE);
g_return_val_if_fail (GST_IS_CAPS (caps2), FALSE);
/* NULL <-> NULL is allowed here */
if (G_UNLIKELY (caps1 == caps2))
return TRUE;
/* one of them NULL => they are different (can't be both NULL because
* we checked that above) */
if (G_UNLIKELY (caps1 == NULL || caps2 == NULL))
return FALSE;
if (G_UNLIKELY (gst_caps_is_fixed (caps1) && gst_caps_is_fixed (caps2)))
return gst_caps_is_equal_fixed (caps1, caps2);
@ -1082,18 +1076,13 @@ gboolean
gst_caps_is_strictly_equal (const GstCaps * caps1, const GstCaps * caps2)
{
int i;
/* FIXME 0.11: NULL pointers are no valid Caps but indicate an error
* So there should be an assertion that caps1 and caps2 != NULL */
/* NULL <-> NULL is allowed here */
g_return_val_if_fail (GST_IS_CAPS (caps1), FALSE);
g_return_val_if_fail (GST_IS_CAPS (caps2), FALSE);
if (G_UNLIKELY (caps1 == caps2))
return TRUE;
/* one of them NULL => they are different (can't be both NULL because
* we checked that above) */
if (G_UNLIKELY (caps1 == NULL || caps2 == NULL))
return FALSE;
if (GST_CAPS_LEN (caps1) != GST_CAPS_LEN (caps2))
return FALSE;