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 552778 - add free_func in gstbuffer instances
add free_func in gstbuffer instances
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal enhancement
: 0.10.22
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-09-18 14:29 UTC by Andy Wingo
Modified: 2008-10-06 18:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to add free_func instance function (1.74 KB, patch)
2008-09-18 14:30 UTC, Andy Wingo
none Details | Review
change so that the free func defaults to g_free, and is called on malloc_data (1.98 KB, patch)
2008-09-30 13:14 UTC, Andy Wingo
accepted-commit_after_freeze Details | Review

Description Andy Wingo 2008-09-18 14:29:56 UTC
Sometimes it's just too much effort to subclass GstBuffer, just to specify that the free function should be free() instead of g_free().

So I would suggest that buffer instances could include free functions in themselves. Patch attached.

The patch does not expand the size of GstBuffer, even if the reserved members were reserved in some future version of GStreamer, as we could simply drop the malloc_data field and keep the free_func function pointer.
Comment 1 Andy Wingo 2008-09-18 14:30:49 UTC
Created attachment 118948 [details] [review]
patch to add free_func instance function
Comment 2 Andy Wingo 2008-09-30 13:14:46 UTC
Created attachment 119646 [details] [review]
change so that the free func defaults to g_free, and is called on malloc_data

The people are with me on this one
Comment 3 Jan Schmidt 2008-09-30 15:08:19 UTC
me too - commit it after the thaw for schizzle