diff --git a/ChangeLog b/ChangeLog index 926aecdd14..7b3ac484f2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-11-06 Wim Taymans + + * gst/gstvalue.c: (gst_type_is_fixed), (gst_value_is_fixed): + Reorganize some more, be more conservative with the GST_TYPE_ARRAY not + being fixed and inline the trivial check. + 2008-11-06 Wim Taymans * gst/gstcaps.c: (gst_caps_copy), (_gst_caps_free), diff --git a/gst/gstvalue.c b/gst/gstvalue.c index 3a7b44cfb6..66b27463ee 100644 --- a/gst/gstvalue.c +++ b/gst/gstvalue.c @@ -157,8 +157,7 @@ gst_type_is_fixed (GType type) } /* our fundamental types that are certainly not fixed */ if (type == GST_TYPE_INT_RANGE || type == GST_TYPE_DOUBLE_RANGE || - type == GST_TYPE_LIST || type == GST_TYPE_FRACTION_RANGE || - type == GST_TYPE_ARRAY) { + type == GST_TYPE_LIST || type == GST_TYPE_FRACTION_RANGE) { return FALSE; } /* other (boxed) types that are fixed */ @@ -3342,8 +3341,10 @@ gst_value_is_fixed (const GValue * value) { GType type = G_VALUE_TYPE (value); - if (gst_type_is_fixed (type)) + /* the most common types are just basic plain glib types */ + if (type <= G_TYPE_MAKE_FUNDAMENTAL (G_TYPE_RESERVED_GLIB_LAST)) { return TRUE; + } if (type == GST_TYPE_ARRAY) { gint size, n; @@ -3358,8 +3359,7 @@ gst_value_is_fixed (const GValue * value) } return TRUE; } - - return FALSE; + return gst_type_is_fixed (type); } /************