diff options
author | Thiago Santos <thiago.sousa.santos@collabora.com> | 2012-06-21 01:28:43 -0300 |
---|---|---|
committer | Thiago Santos <thiago.sousa.santos@collabora.com> | 2012-06-21 10:24:46 -0300 |
commit | a396ba2bde151760b6c5a0ec84266674f501bf74 (patch) | |
tree | 60b6d93acd316efb699fb857740ffca009dab4d1 | |
parent | dd38990717500b89fcc49ccdbe7d0616f479673d (diff) | |
download | gstreamer-a396ba2bde151760b6c5a0ec84266674f501bf74.tar.gz |
inputselector: avoid notify-tags holding lock
unlock before issuing this notification to prevent
deadlocks when other elements reacts to new tags.
Fixes #678220
-rw-r--r-- | plugins/elements/gstinputselector.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/elements/gstinputselector.c b/plugins/elements/gstinputselector.c index 5045caf0c5..114a458ddc 100644 --- a/plugins/elements/gstinputselector.c +++ b/plugins/elements/gstinputselector.c @@ -484,6 +484,7 @@ gst_selector_pad_event (GstPad * pad, GstEvent * event) { gboolean res = TRUE; gboolean forward; + gboolean new_tags = FALSE; GstInputSelector *sel; GstSelectorPad *selpad; GstPad *prev_active_sinkpad; @@ -570,7 +571,7 @@ gst_selector_pad_event (GstPad * pad, GstEvent * event) gst_tag_list_free (oldtags); GST_DEBUG_OBJECT (pad, "received tags %" GST_PTR_FORMAT, newtags); - g_object_notify (G_OBJECT (selpad), "tags"); + new_tags = TRUE; break; } case GST_EVENT_EOS: @@ -597,6 +598,8 @@ gst_selector_pad_event (GstPad * pad, GstEvent * event) break; } GST_INPUT_SELECTOR_UNLOCK (sel); + if (new_tags) + g_object_notify (G_OBJECT (selpad), "tags"); if (forward) { GST_DEBUG_OBJECT (pad, "forwarding event"); res = gst_pad_push_event (sel->srcpad, event); |