mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
inputselector: avoid notify-tags holding lock
unlock before issuing this notification to prevent deadlocks when other elements reacts to new tags. Fixes #678220
This commit is contained in:
parent
cb34c6e156
commit
42fab9db45
1 changed files with 4 additions and 1 deletions
|
@ -454,6 +454,7 @@ gst_selector_pad_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||||
{
|
{
|
||||||
gboolean res = TRUE;
|
gboolean res = TRUE;
|
||||||
gboolean forward;
|
gboolean forward;
|
||||||
|
gboolean new_tags = FALSE;
|
||||||
GstInputSelector *sel;
|
GstInputSelector *sel;
|
||||||
GstSelectorPad *selpad;
|
GstSelectorPad *selpad;
|
||||||
GstPad *prev_active_sinkpad;
|
GstPad *prev_active_sinkpad;
|
||||||
|
@ -524,7 +525,7 @@ gst_selector_pad_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||||
gst_tag_list_unref (oldtags);
|
gst_tag_list_unref (oldtags);
|
||||||
GST_DEBUG_OBJECT (pad, "received tags %" GST_PTR_FORMAT, newtags);
|
GST_DEBUG_OBJECT (pad, "received tags %" GST_PTR_FORMAT, newtags);
|
||||||
|
|
||||||
g_object_notify (G_OBJECT (selpad), "tags");
|
new_tags = TRUE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case GST_EVENT_EOS:
|
case GST_EVENT_EOS:
|
||||||
|
@ -551,6 +552,8 @@ gst_selector_pad_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
GST_INPUT_SELECTOR_UNLOCK (sel);
|
GST_INPUT_SELECTOR_UNLOCK (sel);
|
||||||
|
if (new_tags)
|
||||||
|
g_object_notify (G_OBJECT (selpad), "tags");
|
||||||
if (forward) {
|
if (forward) {
|
||||||
GST_DEBUG_OBJECT (pad, "forwarding event");
|
GST_DEBUG_OBJECT (pad, "forwarding event");
|
||||||
res = gst_pad_push_event (sel->srcpad, event);
|
res = gst_pad_push_event (sel->srcpad, event);
|
||||||
|
|
Loading…
Reference in a new issue