[Bug 784972] New: omx: Possible deadlock in gstomxvideoenc.c

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Sat Jul 15 08:34:26 UTC 2017


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

            Bug ID: 784972
           Summary: omx: Possible deadlock in gstomxvideoenc.c
    Classification: Platform
           Product: GStreamer
           Version: 1.12.2
                OS: All
            Status: NEW
          Severity: critical
          Priority: Normal
         Component: gst-omx
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: sp.gupta at samsung.com
        QA Contact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---

Hello All,

There is possible deadlock in gstomxvideoenc.c

File  : gst-omx/omx/gstomxvideoenc.c

In function "gst_omx_video_enc_drain" at line: 1752

There if  g_mutex_lock (&self->drain_lock) at line: 1743 but incase of fails of
"gst_omx_port_release_buffer"

There is no unlock of "self->drain_lock".

below are snippet
=================================================
  if (err != OMX_ErrorNone) {
    GST_ERROR_OBJECT (self, "Failed to drain component: %s (0x%08x)",
        gst_omx_error_to_string (err), err);
    GST_VIDEO_ENCODER_STREAM_LOCK (self);
    return GST_FLOW_ERROR;
  }
================================================
Solution: There should be g_mutex_unlock (&self->drain_lock) in failure case;

Please check and provide your feedback.

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