+2005-11-22 Jan Schmidt <thaytan@mad.scientist.com>
+
+ * check/gst/gststructure.c: (GST_START_TEST):
+ * gst/gststructure.c: (gst_structure_parse_value):
+ Oops, broke automatic string type parsing.
+ Add a test to catch it in future.
+
2005-11-22 Andy Wingo <wingo@pobox.com>
* gst/gsttagsetter.c (gst_tag_setter_get_tag_merge_mode)
fail_unless ((val = gst_structure_get_value (structure, "value")) != NULL);
fail_unless (GST_VALUE_HOLDS_FRACTION (val));
gst_structure_free (structure);
+
+ s = "test-string,value=bar";
+ structure = gst_structure_from_string (s, NULL);
+ fail_if (structure == NULL, "Could not get structure from string %s", s);
+ fail_unless ((val = gst_structure_get_value (structure, "value")) != NULL);
+ fail_unless (G_VALUE_HOLDS_STRING (val));
+ gst_structure_free (structure);
}
GST_END_TEST;
{ G_TYPE_INT, G_TYPE_DOUBLE, GST_TYPE_FRACTION, G_TYPE_STRING };
int i;
- for (i = 0; i < 3; i++) {
+ for (i = 0; i < 4; i++) {
g_value_init (value, try_types[i]);
ret = gst_value_deserialize (value, value_s);
if (ret)
fail_unless ((val = gst_structure_get_value (structure, "value")) != NULL);
fail_unless (GST_VALUE_HOLDS_FRACTION (val));
gst_structure_free (structure);
+
+ s = "test-string,value=bar";
+ structure = gst_structure_from_string (s, NULL);
+ fail_if (structure == NULL, "Could not get structure from string %s", s);
+ fail_unless ((val = gst_structure_get_value (structure, "value")) != NULL);
+ fail_unless (G_VALUE_HOLDS_STRING (val));
+ gst_structure_free (structure);
}
GST_END_TEST;