diff options
author | Sebastian Dröge <slomo@circular-chaos.org> | 2013-07-12 10:08:26 +0200 |
---|---|---|
committer | Sebastian Dröge <slomo@circular-chaos.org> | 2013-07-12 10:08:26 +0200 |
commit | 717ad2091209bf3b736cfd9784ca1e710a5020a6 (patch) | |
tree | 51138bb8cc7058d22725d5ceaa57e5947217029c /plugins/elements | |
parent | f8fdb61b02cbcfc6f6bbc136ada329db128dab3f (diff) |
inputselector: Deactivate and remove pad without the inputselector lock
Otherwise we might get deadlocks caused by lock order inversion:
During the chain function the stream lock is first locked and then the
inputselector lock. During pad release we first locked the inputselector
lock and then deactivating the pad would lock the stream lock.
There's no reason why the inputselector lock should be required while
deactivating and removing the pad, it's only needed before.
https://bugzilla.gnome.org/show_bug.cgi?id=704002
Diffstat (limited to 'plugins/elements')
-rw-r--r-- | plugins/elements/gstinputselector.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/elements/gstinputselector.c b/plugins/elements/gstinputselector.c index 6fcda9347..6c1952c10 100644 --- a/plugins/elements/gstinputselector.c +++ b/plugins/elements/gstinputselector.c @@ -1699,10 +1699,10 @@ gst_input_selector_release_pad (GstElement * element, GstPad * pad) sel->active_sinkpad = NULL; } sel->n_pads--; + GST_INPUT_SELECTOR_UNLOCK (sel); gst_pad_set_active (pad, FALSE); gst_element_remove_pad (GST_ELEMENT (sel), pad); - GST_INPUT_SELECTOR_UNLOCK (sel); } static void |