[Bug 773473] kmssink: support display mode setting

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Wed Nov 9 11:37:32 UTC 2016


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

--- Comment #32 from Víctor Manuel Jáquez Leal <vjaquez at igalia.com> ---
(In reply to Michael Tretter from comment #30)
> (In reply to Víctor Manuel Jáquez Leal from comment #29)
> > ::: sys/kms/gstkmsallocator.c
> > @@ +335,3 @@
> >    kmsmem = (GstKMSMemory *) mem;
> >    if (kmsmem->bo)
> > +    kmsmem->bo->refs--;
> > 
> > did you forget to unmap the bo when refs == 0?
> 
> The buffer object is unmapped and destroyed in
> gst_kms_allocator_memory_reset.

I'm not sure about this approach. I would unmap when the map_counter reach
zero, otherwise a bad code could unmap forever.
gst_kms_allocator_memory_reset() should force the unmap, if is still mapped
with a g_warning message, and then destroy the dumb buffer.

Also, I'm wondering if we should add mutexes when mapping-unmapping if there
are threads using the buffers. But that could go in other patch.

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