[Bug 733864] v4l2videodec: Implement EOS handling through V4L2_DEC_CMD_STOP

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Sat Apr 16 14:41:38 UTC 2016


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

--- Comment #24 from Nicolas Dufresne (stormer) <nicolas at ndufresne.ca> ---
Review of attachment 310576:
 --> (https://bugzilla.gnome.org/review?bug=733864&attachment=310576)

::: sys/v4l2/gstv4l2videodec.c
@@ +344,3 @@
+    GST_OBJECT_LOCK (decoder->srcpad->task);
+    GST_TASK_WAIT (decoder->srcpad->task);
+    GST_OBJECT_UNLOCK (decoder->srcpad->task);

So, here's exactly what need fixing. First, you use the wrong lock, then you
need to spin over the condition you want to change.

/* GstPad call gst_task_set_lock() using the stream lock */
GST_PAD_STREAM_LOCK (decoder->srcpad);
while (decoder->srcpad->task->running)
  GST_TASK_WAIT (decoder->srcpad->task);
GST_PAD_STREAM_UNLOCK (decoder->srcpad);

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