[Bug 762177] v4l2src: Potential race condition with pool release on renegotiation

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Mon Feb 22 20:54:13 UTC 2016


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

--- Comment #3 from Nicolas Dufresne (stormer) <nicolas.dufresne at collabora.co.uk> ---
Comment on attachment 321474
  --> https://bugzilla.gnome.org/attachment.cgi?id=321474
A simple demo showing how the race condition causes the v4l2src to crash

+/* buffers are refed to simpulate buffers that are being utilized for
processing.
+ * This is of course incorrect and will lead to the pipeline being stalled.
+ * However, the framerate should be low enough that the race condition is
triggered
+ * before starvation becomes an issue.
+ */
+static GstPadProbeReturn
+gst_qtec_camera_src_imgsrc_probe (GstPad * pad, GstPadProbeInfo * info,
+    gpointer data)
+{
+  GstBuffer *buffer;
+
+  buffer = GST_PAD_PROBE_INFO_BUFFER (info);
+  gst_buffer_ref (buffer);
+  return GST_PAD_PROBE_OK;
+}

So you leak all buffers, and don't given them back, this is not a supported
scenario for renegotiation (v4l2 driver limitation). What could be done is to
add a property to force copies, so you can freely leak and renegotiate. Patch
welcome.

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