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 450117 - [PATCH] gst.event_new_custom needs to copy structure as C method assumes ownership of structure
[PATCH] gst.event_new_custom needs to copy structure as C method assumes owne...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-python
git master
Other Linux
: Normal normal
: 0.10.8
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-06-22 16:30 UTC by Zaheer Abbas Merali
Modified: 2007-07-09 19:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
override for event_new_custom (1.71 KB, patch)
2007-06-22 16:31 UTC, Zaheer Abbas Merali
committed Details | Review

Description Zaheer Abbas Merali 2007-06-22 16:30:52 UTC
gst.event_new_custom needs to copy structure as C method assumes ownership of structure. Structures have no refcount so a copy is required. Python will garbage collect the structure passed to the method after it goes out of scope sow ithout this patch, get criticals and sometimes segfaults when it does the destruction of the structure.
Comment 1 Zaheer Abbas Merali 2007-06-22 16:31:31 UTC
Created attachment 90465 [details] [review]
override for event_new_custom
Comment 2 Edward Hervey 2007-07-09 19:31:17 UTC
It was also wrong for gst.event_new_navigation().

2007-07-09  Edward Hervey  <bilboed@bilboed.com>

	Patch by: Zaheer Abbas Merali <zaheermerali@gmail.com>
	* gst/gstevent.override:
	Copy the GstStructure given as argument to gst_event_new_custom
	and gst_event_new_navigation, else it would be freed when the python
	object wrapping that structure goes out of scope.
	Fixes #450117