After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 549450 - caps.append_structure() gives warnings if structure is non-writable
caps.append_structure() gives warnings if structure is non-writable
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-python
git master
Other Linux
: Normal normal
: 0.10.13
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-08-26 15:28 UTC by Tim-Philipp Müller
Modified: 2008-08-26 15:58 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Tim-Philipp Müller 2008-08-26 15:28:32 UTC
#!/usr/bin/python
import gobject
gobject.threads_init()
import gst

c = gst.Caps('foo/bar')
for s in c:
  c2 = gst.Caps()
  c2.append_structure(s)

gives a:

(foo.py:31165): GStreamer-CRITICAL **: gst_caps_append_structure: assertion `structure->parent_refcount == NULL' failed

warning.

You could argue that it's the caller's responsibility to make sure the structure is writable and all, just like in C, but I think this is python and it should Just Work, no?
Comment 1 Edward Hervey 2008-08-26 15:58:24 UTC
2008-08-26  Edward Hervey  <edward.hervey@collabora.co.uk>

	* gst/gstcaps.override:
	Override gst_caps_append_structure() and make a copy of the structure
	given as argument.
	Fixes #549450