mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
decodebin: Don't hold EXPOSE_LOCK in type_found() outside the stream lock
In other places we lock it the other way around, leading to possible deadlocks. Also this will deadlock if analyze_pad() causes a new element to be autoplugged that adds new pads on itself when its state is changed. https://bugzilla.gnome.org/show_bug.cgi?id=763491
This commit is contained in:
parent
0a434e9c6c
commit
001c7f04a0
1 changed files with 2 additions and 5 deletions
|
@ -2841,7 +2841,6 @@ type_found (GstElement * typefind, guint probability,
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPOSE_LOCK (decode_bin);
|
|
||||||
pad = gst_element_get_static_pad (typefind, "src");
|
pad = gst_element_get_static_pad (typefind, "src");
|
||||||
sink_pad = gst_element_get_static_pad (typefind, "sink");
|
sink_pad = gst_element_get_static_pad (typefind, "sink");
|
||||||
|
|
||||||
|
@ -2862,17 +2861,15 @@ type_found (GstElement * typefind, guint probability,
|
||||||
if (analyze_new_pad (decode_bin, typefind, pad, caps,
|
if (analyze_new_pad (decode_bin, typefind, pad, caps,
|
||||||
decode_bin->decode_chain, NULL))
|
decode_bin->decode_chain, NULL))
|
||||||
expose_pad (decode_bin, typefind, decode_bin->decode_chain->current_pad,
|
expose_pad (decode_bin, typefind, decode_bin->decode_chain->current_pad,
|
||||||
pad, caps, decode_bin->decode_chain, FALSE);
|
pad, caps, decode_bin->decode_chain, TRUE);
|
||||||
|
|
||||||
gst_decode_chain_unref (chain);
|
gst_decode_chain_unref (chain);
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_PAD_STREAM_UNLOCK (sink_pad);
|
GST_PAD_STREAM_UNLOCK (sink_pad);
|
||||||
|
|
||||||
gst_object_unref (sink_pad);
|
gst_object_unref (sink_pad);
|
||||||
gst_object_unref (pad);
|
gst_object_unref (pad);
|
||||||
|
|
||||||
EXPOSE_UNLOCK (decode_bin);
|
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue