gst/gstvalue.c: Should handle both value arrays and value lists.

Original commit message from CVS:
* gst/gstvalue.c: (gst_value_is_fixed):
Should handle both value arrays and value lists.
This commit is contained in:
Tim-Philipp Müller 2005-11-21 12:42:41 +00:00
parent 9dc3c08477
commit 8759556717
2 changed files with 20 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2005-11-21 Tim-Philipp Müller <tim at centricular dot net>
* gst/gstvalue.c: (gst_value_is_fixed):
Should handle both value arrays and value lists.
2005-11-21 Andy Wingo <wingo@pobox.com>
patch by: Alessandro Dessina <alessandro nnva org>

View file

@ -2691,6 +2691,21 @@ gst_value_is_fixed (const GValue * value)
return fixed;
}
if (type == GST_TYPE_LIST) {
gboolean fixed = TRUE;
gint size, n;
const GValue *kid;
/* check recursively */
size = gst_value_list_get_size (value);
for (n = 0; n < size; n++) {
kid = gst_value_list_get_value (value, n);
fixed &= gst_value_is_fixed (kid);
}
return fixed;
}
return gst_type_is_fixed (type);
}