mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
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
This commit is contained in:
parent
7c84581a90
commit
61763adf68
2 changed files with 5 additions and 3 deletions
|
@ -841,6 +841,7 @@ gst_caps_load_thyself (xmlNodePtr parent)
|
||||||
xmlNodePtr subfield = field->xmlChildrenNode;
|
xmlNodePtr subfield = field->xmlChildrenNode;
|
||||||
GstCaps *caps;
|
GstCaps *caps;
|
||||||
gchar *content;
|
gchar *content;
|
||||||
|
gboolean fixed = TRUE;
|
||||||
|
|
||||||
g_mutex_lock (_gst_caps_chunk_lock);
|
g_mutex_lock (_gst_caps_chunk_lock);
|
||||||
caps = g_mem_chunk_alloc0 (_gst_caps_chunk);
|
caps = g_mem_chunk_alloc0 (_gst_caps_chunk);
|
||||||
|
@ -848,7 +849,6 @@ gst_caps_load_thyself (xmlNodePtr parent)
|
||||||
|
|
||||||
caps->refcount = 1;
|
caps->refcount = 1;
|
||||||
caps->next = NULL;
|
caps->next = NULL;
|
||||||
caps->fixed = TRUE;
|
|
||||||
|
|
||||||
while (subfield) {
|
while (subfield) {
|
||||||
if (!strcmp (subfield->name, "name")) {
|
if (!strcmp (subfield->name, "name")) {
|
||||||
|
@ -861,10 +861,13 @@ gst_caps_load_thyself (xmlNodePtr parent)
|
||||||
}
|
}
|
||||||
else if (!strcmp (subfield->name, "properties")) {
|
else if (!strcmp (subfield->name, "properties")) {
|
||||||
caps->properties = gst_props_load_thyself (subfield);
|
caps->properties = gst_props_load_thyself (subfield);
|
||||||
|
fixed &= caps->properties->fixed;
|
||||||
}
|
}
|
||||||
|
|
||||||
subfield = subfield->next;
|
subfield = subfield->next;
|
||||||
}
|
}
|
||||||
|
caps->fixed = fixed;
|
||||||
|
|
||||||
result = gst_caps_append (result, caps);
|
result = gst_caps_append (result, caps);
|
||||||
}
|
}
|
||||||
field = field->next;
|
field = field->next;
|
||||||
|
|
|
@ -35,8 +35,7 @@ extern GType _gst_caps_type;
|
||||||
#define GST_TYPE_CAPS (_gst_caps_type)
|
#define GST_TYPE_CAPS (_gst_caps_type)
|
||||||
|
|
||||||
|
|
||||||
#define GST_CAPS(caps) \
|
#define GST_CAPS(caps) ((GstCaps *)(caps))
|
||||||
((GstCaps *)(caps))
|
|
||||||
|
|
||||||
#define GST_CAPS_IS_FIXED(caps) ((caps)->fixed)
|
#define GST_CAPS_IS_FIXED(caps) ((caps)->fixed)
|
||||||
#define GST_CAPS_IS_CHAINED(caps) ((caps)->next)
|
#define GST_CAPS_IS_CHAINED(caps) ((caps)->next)
|
||||||
|
|
Loading…
Reference in a new issue