[Gstreamer-bugs] [Bug 115886] New - gst_caps_has_(fixed_)property() prints an assertion before returning false

bugzilla-daemon at widget.gnome.org bugzilla-daemon at widget.gnome.org
Tue Jun 24 14:17:12 PDT 2003


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

http://bugzilla.gnome.org/show_bug.cgi?id=115886

Changed by laurent at datarescue.be.

--- shadow/115886	Tue Jun 24 17:17:12 2003
+++ shadow/115886.tmp.27482	Tue Jun 24 17:17:12 2003
@@ -0,0 +1,63 @@
+Bug#: 115886
+Product: GStreamer
+Version: 0.6.2
+OS: All
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: minor
+Priority: Normal
+Component: gstreamer (core)
+AssignedTo: gstreamer-maint at bugzilla.gnome.org                            
+ReportedBy: laurent at datarescue.be               
+QAContact: gstreamer-maint at bugzilla.gnome.org
+TargetMilestone: HEAD
+URL: 
+Summary: gst_caps_has_(fixed_)property() prints an assertion before returning false
+
+gst_caps_has_property() and gst_caps_has_fixed_property() are predicate
+macros which can be used to check if a given GstCaps object handles a named
+property.
+
+The problem here is that an assertion failure is printed each time these
+macros are called with a property name the caps does not handle.
+
+It is not critical since these macros return false anyway.
+
+Here is a test program which illustrates this problem:
+
+  #include <gst/gst.h>
+ 
+  int main(int argc, char *argv[]) {
+      GstElementFactory *factory;
+      GstPadTemplate *pad_template;
+      GstCaps *caps;
+     
+      gst_init(&argc, &argv);
+     
+      factory = gst_element_factory_find("mad");
+      pad_template = (GstPadTemplate *) factory->padtemplates->data;
+      caps = pad_template->caps;
+     
+      printf("%d\n", gst_caps_has_property(caps, "does_not_exist"));
+      printf("%d\n", gst_caps_has_fixed_property(caps, "does_not_exist"));
+     
+      return 0;
+  }
+
+And its output (on 0.6.2):
+
+  INFO (10110: 0) Initializing GStreamer Core Library version 0.6.2
+  INFO (10110: 0) CPU features: (00000000) MMX SSE
+  INFO (10110: 0) registry: loaded global_registry in 0.220729 seconds
+            (/usr/X11R6/share/gnome/cache/gstreamer-0.6/registry.xml)
+ 
+  (process:10110): GStreamer-CRITICAL **: file gstprops.c: line 1001
+(gst_props_get_entry): assertion `props != NULL' failed
+0
+ 
+  (process:10110): GStreamer-CRITICAL **: file gstprops.c: line 1001
+(gst_props_get_entry): assertion `props != NULL' failed
+0
+
+This has been tested on both Gentoo GNU/Linux and FreeBSD.





More information about the Gstreamer-bugs mailing list