Commit 61763adf authored by Wim Taymans's avatar Wim Taymans

Small cleanup, fix fixed caps detection even on XML load

Original commit message from CVS:
Small cleanup, fix fixed caps detection even on XML load
parent 7c84581a
......@@ -841,6 +841,7 @@ gst_caps_load_thyself (xmlNodePtr parent)
xmlNodePtr subfield = field->xmlChildrenNode;
GstCaps *caps;
gchar *content;
gboolean fixed = TRUE;
g_mutex_lock (_gst_caps_chunk_lock);
caps = g_mem_chunk_alloc0 (_gst_caps_chunk);
......@@ -848,7 +849,6 @@ gst_caps_load_thyself (xmlNodePtr parent)
caps->refcount = 1;
caps->next = NULL;
caps->fixed = TRUE;
while (subfield) {
if (!strcmp (subfield->name, "name")) {
......@@ -861,10 +861,13 @@ gst_caps_load_thyself (xmlNodePtr parent)
}
else if (!strcmp (subfield->name, "properties")) {
caps->properties = gst_props_load_thyself (subfield);
fixed &= caps->properties->fixed;
}
subfield = subfield->next;
}
caps->fixed = fixed;
result = gst_caps_append (result, caps);
}
field = field->next;
......
......@@ -35,8 +35,7 @@ extern GType _gst_caps_type;
#define GST_TYPE_CAPS (_gst_caps_type)
#define GST_CAPS(caps) \
((GstCaps *)(caps))
#define GST_CAPS(caps) ((GstCaps *)(caps))
#define GST_CAPS_IS_FIXED(caps) ((caps)->fixed)
#define GST_CAPS_IS_CHAINED(caps) ((caps)->next)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment