[Bug 796692] sample/bufferlist/buffer: Non-writable container miniobjects allow writable access to their contents, causing memory problems

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Thu Jul 5 06:19:38 UTC 2018


https://bugzilla.gnome.org/show_bug.cgi?id=796692

Sebastian Dröge (slomo) <slomo at coaxion.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #372939|0                           |1
        is obsolete|                            |

--- Comment #31 from Sebastian Dröge (slomo) <slomo at coaxion.net> ---
Created attachment 372947
  --> https://bugzilla.gnome.org/attachment.cgi?id=372947&action=edit
miniobject: Add parent pointers to the miniobject to influence writability

Every container of miniobjects now needs to store itself as parent in
the child object, and remove itself again at a later time.

A miniobject is only writable if there is at most one parent, and that
parent is writable itself, and if the reference count of the miniobject
is 1.

GstBuffer (for memories), GstBufferList (for buffers) and GstSample (for
caps, buffer, bufferlist) was updated accordingly.

Without this it was possible to have e.g. a bufferlist with refcount 2
in two places, modifying the same buffer with refcount 1 at the same
time.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list