GNOME Bugzilla – Bug 410772
Crash copying a GstNetBuffer
Last modified: 2007-02-22 12:58:09 UTC
(Cloning bug for release notes/buglist etc.) +++ This bug was initially created as a clone of Bug #393099 +++ The GstBuffer class ::copy() vfunc wrongly creates a new buffer with a GstBuffer GType and the size of a GstBuffer structure, instead of creating a new buffer with the same type and size as the input buffer. This fails spectactularly in the case of GstNetBuffer from gst-plugins-base, which just chains up to GstBuffer::copy and then copies over some additional fields. ...
2007-02-22 Tim-Philipp Müller <tim at centricular dot net> * gst-libs/gst/netbuffer/gstnetbuffer.c: (notgst_buffer_copy_fields_in_place), (gst_netbuffer_copy): Fix copying of GstNetBuffer (would crash before, or at least lead to invalid memory access, #410772), for now by copying the GstBuffer copy code from the core over here so we can copy the GstBuffer fields on a provided buffer instance (of type GstNetBuffer in this case). Would be better to fix this with some support by the core though (and in the long run change the broken GstBuffer/GstMiniObject copy semantics, #393099). * tests/check/Makefile.am: Enable unit test for GstNetBuffer.