[Bug 759292] Buffer free on error leads to infinite recursion in gstv4l2

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Wed Jun 28 19:14:36 UTC 2017


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

Matt Fischer <mattfischer84 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mattfischer84 at gmail.com

--- Comment #1 from Matt Fischer <mattfischer84 at gmail.com> ---
Created attachment 354639
  --> https://bugzilla.gnome.org/attachment.cgi?id=354639&action=edit
Block recursive calls to gst_v4l2_buffer_pool_resurect_buffer()

I recently encountered this bug as well.  I don't know the v4l2 code well
enough to fully understand what is going wrong, but the immediate cause is that
the group-released signal is triggering a call to
gst_v4l2_buffer_pool_resurect_buffer(), which allocates and frees a buffer. 
The free results in group-released being sent again, so the code recurses
infinitely.

The simplest solution is just to block reception of the signal while the signal
handler is running.  This seemed to resolve the problem for me, but I don't
know if it is the correct solution.  I've attached a patch, can anybody comment
on its correctness?

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