From: Wim T. <wt...@us...> - 2002-12-18 23:00:49
|
CVS Root: /cvsroot/gstreamer Module: gstreamer Changes by: wtay Date: Wed Dec 18 2002 15:00:48 PST Log message: Small cleanup, fix fixed caps detection even on XML load Modified files: gst : gstcaps.c gstcaps.h Links: http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstcaps.c.diff?r1=1.55&r2=1.56 http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstcaps.h.diff?r1=1.46&r2=1.47 ====Begin Diffs==== Index: gstcaps.c =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gstcaps.c,v retrieving revision 1.55 retrieving revision 1.56 diff -u -d -r1.55 -r1.56 --- gstcaps.c 2 Oct 2002 07:51:53 -0000 1.55 +++ gstcaps.c 18 Dec 2002 23:00:31 -0000 1.56 @@ -841,6 +841,7 @@ 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 @@ caps->refcount = 1; caps->next = NULL; - caps->fixed = TRUE; while (subfield) { if (!strcmp (subfield->name, "name")) { @@ -861,10 +861,13 @@ } 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; Index: gstcaps.h =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gstcaps.h,v retrieving revision 1.46 retrieving revision 1.47 diff -u -d -r1.46 -r1.47 --- gstcaps.h 6 Dec 2002 13:37:43 -0000 1.46 +++ gstcaps.h 18 Dec 2002 23:00:34 -0000 1.47 @@ -35,8 +35,7 @@ #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) |