[gstreamer-bugs] [Bug 324162] New: Add gst_buffer_make_meta_writable or similar
GStreamer (bugzilla.gnome.org)
bugzilla-daemon at bugzilla.gnome.org
Thu Dec 15 02:34:28 PST 2005
Do not reply to this via email (we are currently unable to handle email
responses and they get discarded). You can add comments to this bug at
http://bugzilla.gnome.org/show_bug.cgi?id=324162
GStreamer | gstreamer (core) | Ver: HEAD CVS
Summary: Add gst_buffer_make_meta_writable or similar
Product: GStreamer
Version: HEAD CVS
Platform: Other
OS/Version: Linux
Status: UNCONFIRMED
Severity: enhancement
Priority: Normal
Component: gstreamer (core)
AssignedTo: gstreamer-bugs at lists.sourceforge.net
ReportedBy: thaytan at mad.scientist.com
QAContact: gstreamer-bugs at lists.sourceforge.net
CC: all-bugs at bugzilla.gnome.org
It is dangerous to do modifications to the metadata of a buffer like:
http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-base/gst/playback/gstplaybin.c.diff?r1=1.73&r2=1.74
Because buffers are refcounted, only the creator of a buffer can be sure that
the metadata can be safely modified. One option is to call
gst_buffer_make_writable, but that will copy the data block unnecessarily.
I'dlike to add a core utility function called something like
gst_buffer_make_meta_writable that will check the refcount on the MiniObject. If
the refcount is 1, then the metadata is modifiable, otherwise create a subbuffer
of the entire contents and return that instead.
This would also remove the ugly bit of code in basetransform that checks the
refcount itself.
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are the QA contact for the bug.
More information about the Gstreamer-bugs
mailing list