[Bug 758274] New: gst-omx: video decoder blocks the pipeline when a drain request is issued during flush

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Wed Nov 18 02:52:54 PST 2015


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

            Bug ID: 758274
           Summary: gst-omx: video decoder blocks the pipeline when a
                    drain request is issued during flush
    Classification: Platform
           Product: GStreamer
           Version: git master
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gst-omx
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: eocanha at igalia.com
        QA Contact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---

Created attachment 315815
  --> https://bugzilla.gnome.org/attachment.cgi?id=315815&action=edit
Proposed patch

When a drain request is issued, the "input thread" in the OMX video decoder
element sets the "draining" condition and keeps waiting until the streaming
thread processes it and awakes the input thread by broadcasting on
"drain_cond".

However, when a flush happens in the middle of this process, the code paths in
gst_omx_video_dec_loop() just stop the streaming thread without caring about
the "draining" condition, leaving the "input thread" waiting forever and half
of the pipeline blocked because of that.

The proposed patch takes care of the "draining" condition during flushes and
just does nothing (the flush is going to drain the component anyway).

Even with that change, gst_omx_video_dec_flush() blocks forever in
http://cgit.freedesktop.org/gstreamer/gst-omx/tree/omx/gstomxvideodec.c#n2110
when the previous call to gst_omx_component_set_state() fails in
http://cgit.freedesktop.org/gstreamer/gst-omx/tree/omx/gstomx.c#n827. To
mitigate that, I set "last_error" to true, so the code in
http://cgit.freedesktop.org/gstreamer/gst-omx/tree/omx/gstomx.c#n862 exits
early and doesn't block.

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