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 534888 - gst-python refcount error with gst_event_new_tag
gst-python refcount error with gst_event_new_tag
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-python
git master
Other Linux
: Normal normal
: 0.10.12
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-05-26 10:10 UTC by Luca Ognibene
Modified: 2008-05-26 10:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
override for gst_event_new_tag (1.33 KB, patch)
2008-05-26 10:18 UTC, Edward Hervey
committed Details | Review

Description Luca Ognibene 2008-05-26 10:10:15 UTC
If i try to create a tag event from a python element i get a lot of warnings:

GStreamer-CRITICAL **: gst_structure_free: assertion `structure->parent_refcount == NULL' failed

My example code is:

       if ret == gst.FLOW_OK:            
            t = gst.TagList ()
            t['archive_status'] = str (self.array.current_status)
            ev = gst.event_new_tag (t)
            #pad = self.get_pad ('src')
            #pad.push_event (ev)
        
        return ret, data
Comment 1 Edward Hervey 2008-05-26 10:14:34 UTC
The problem is that gst_event_new_tag takes ownership of the given taglist.

The solution might be to make a copy of the given taglist in the bindings.
Comment 2 Edward Hervey 2008-05-26 10:18:21 UTC
Created attachment 111551 [details] [review]
override for gst_event_new_tag

Proposed override, in the same spirit as the overrides for gst_event_new_custom and gst_event_new_navigation, which both have the same issue.
Comment 3 Edward Hervey 2008-05-26 10:20:40 UTC
2008-05-26  Edward Hervey  <edward.hervey@collabora.co.uk>

	* gst/gstevent.override:
	gst_event_new_tag takes ownership of the GstTagList given
	as argument, therefore make a copy before calling the
	C function.
	Fixes #534888