[Bug 790431] gstpad: Make calls to GstPadActivateFunction MT-safe

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Thu Nov 16 10:50:29 UTC 2017


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

Edward Hervey <bilboed at bilboed.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from Edward Hervey <bilboed at bilboed.com> ---
commit d915dd4b20ffdcb417ea4b46a8dd9010c7ce7bf9 (HEAD -> master, origin/master,
origin/HEAD)
Author: Edward Hervey <edward at centricular.com>
Date:   Thu Nov 16 10:47:46 2017 +0100

    gstpad: Make pad (de)activation atomic

    The following could happen previously:
    * T1: calls gst_pad_set_active()
    * T2: currently (de)activating it
    * T1: gst_pad_set_active() returns, caller assumes that the pad has
      completed the requested (de)activation ... whereas it is not
      the case since the actual (de)activation in T2 might still be
      going on.

    To ensure atomicity of pad (de)activation, we use a internal
    variable (and cond) to ensure only one thread at a time goes through
    the actual (de)activation block

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

commit 80262013ca553fa5b35e5c638893d3512a3dd7dc
Author: Edward Hervey <edward at centricular.com>
Date:   Thu Nov 16 08:26:12 2017 +0100

    gstpad: Make calls to GstPadActivateFunction MT-safe

    checking whether we already were in the target GstPadMode was being
    done too early and there was the risk that we *would* end up
    (de)activating a pad more than once.

    Instead, re-do the check for pad mode when entering the final pad
    (de)activation block.

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

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