[gst-devel] gst_structure_from_string octal codes

Martin Pokorny mpokorny at nrao.edu
Fri Jul 18 16:54:35 CEST 2008


Hi, all;

It seems to me that gst_structure_from_string does not correctly convert octal
codes created by gst_structure_to_string. A short example:

const gchar *str = "hello\tworld";
GstStructure *s0 = gst_structure_new("foo",
                                     "list", G_TYPE_STRING, str,
                                     NULL);
gchar *s0str = gst_structure_to_string(s0);
printf("s0str: %s\n", s0str);
GstStructure *s1 = gst_structure_from_string(s0str, NULL);
const gchar *list = gst_structure_get_string(s1, "list");
printf("list: %s\n", list);

Running this code, I see:
s0str: foo, list=(string)"hello\011world"
list: hello011world

Shouldn't gst_structure_from_string convert the \011 back to a tab character?

-- 
Martin






More information about the gstreamer-devel mailing list