From 61763adf6875912f66552c6e023442a08fac7ce3 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 18 Dec 2002 23:00:34 +0000 Subject: [PATCH] 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 --- gst/gstcaps.c | 5 ++++- gst/gstcaps.h | 3 +-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/gst/gstcaps.c b/gst/gstcaps.c index a42c0d44ef..cab81bfecb 100644 --- a/gst/gstcaps.c +++ b/gst/gstcaps.c @@ -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; diff --git a/gst/gstcaps.h b/gst/gstcaps.h index ad5b03481d..cabd478677 100644 --- a/gst/gstcaps.h +++ b/gst/gstcaps.h @@ -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)