From: Wim Taymans Date: Mon, 12 Mar 2012 11:35:07 +0000 (+0100) Subject: caps: fix some 0.11 FIXMEs X-Git-Tag: RELEASE-0.11.3~49 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4feb6c3989e7625829da91345324ecaac16b4e4d;p=platform%2Fupstream%2Fgstreamer.git caps: fix some 0.11 FIXMEs --- diff --git a/gst/gstcaps.c b/gst/gstcaps.c index a51f113..edf69cd 100644 --- a/gst/gstcaps.c +++ b/gst/gstcaps.c @@ -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;