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 695756 - gst_buffer_make_writable will lost the user_data
gst_buffer_make_writable will lost the user_data
Status: RESOLVED NOTABUG
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
1.0.5
Other Linux
: Normal major
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-03-13 10:33 UTC by zhangyanping
Modified: 2013-03-14 06:53 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description zhangyanping 2013-03-13 10:33:09 UTC
Hello everyone,

The code is like this:

 gst_mini_object_set_qdata( GST_MINI_OBJECT(buffer),  g_quark_from_static_string("avl_video_display_frame"),  ptr, 0);

   buffer = gst_buffer_make_writable(buffer);

   And then the user_data I set to the buffer is lost.

================================

#define         gst_buffer_is_writable(buf)     gst_mini_object_is_writable (GST_MINI_OBJECT_CAST (buf))


gst_mini_object_copy-->_gst_buffer_copy-->gst_buffer_copy_into

Should gst_buffer_copy_into copy qdata of gstminiobject ?

Is this a bug?
Comment 1 Wim Taymans 2013-03-13 10:38:47 UTC
The qdata is never copied, it belongs to the unique miniobject you set it on.
Comment 2 Tim-Philipp Müller 2013-03-13 11:32:54 UTC
GstMeta is for stuff that might be copied to other buffer instances, qdata is object-specific.
Comment 3 zhangyanping 2013-03-14 06:53:51 UTC
Thank you guys !