[Bug 777399] v4l2allocator: memory referenced too late

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Tue Jan 17 17:24:37 UTC 2017


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

Nicolas Dufresne (stormer) <nicolas at ndufresne.ca> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |nicolas at ndufresne.ca
         Resolution|---                         |INVALID

--- Comment #2 from Nicolas Dufresne (stormer) <nicolas at ndufresne.ca> ---
I think this report is invalid. gst_v4l2_allocator_qbuf() is called by
gst_v4l2_buffer_pool_qbuf(). The second parameter of this function is GstBuffer
which should be owned by the called (ref > 0). Which means when
gst_v4l2_allocator_qbuf() is called, the GstMemory objects are still owned by
this GstBuffer. The last reference to the GstMemory won't be dropped before the
function returns.

What those lines do, is that they raise the ref count of the memories to at
least 2 (hence the read only comment), before returning. This way, if the last
reference is later dropped, the allocator remains owner.

-- 
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