From: Seungha Yang Date: Thu, 19 May 2016 06:36:57 +0000 (+0900) Subject: matroskademux: don't hold object lock whilst pushing out headers X-Git-Tag: 1.10.4~389 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=eb09829a1c1987373ae433daca6420ea6c0fb908;p=platform%2Fupstream%2Fgst-plugins-good.git matroskademux: don't hold object lock whilst pushing out headers matroskademux would take the GST_OBJECT_LOCK in - gst_matroska_demux_push_codec_data_all() - gst_matroska_demux_query() Some parse element such as FLAC checks upstream seekability, and there is some use cases that matroska-demux is linked to a parse element (e.g.,FLAC format) without intermediate elements (e.g., queue). In this case, matroska-demux never returns from _push_codec_data_all() because the parser can return only after it receives the response to the upstream query, but that's not going to happen because it's deadlocked. Elements must not hold the object lock whilst pushing out events or data. https://bugzilla.gnome.org/show_bug.cgi?id=766645 --- diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c index c5fee77..70f09e8 100644 --- a/gst/matroska/matroska-demux.c +++ b/gst/matroska/matroska-demux.c @@ -2752,8 +2752,6 @@ gst_matroska_demux_push_codec_data_all (GstMatroskaDemux * demux) { gint stream_nr; - GST_OBJECT_LOCK (demux); - g_assert (demux->common.num_streams == demux->common.src->len); for (stream_nr = 0; stream_nr < demux->common.src->len; stream_nr++) { GstMatroskaTrackContext *stream; @@ -2778,7 +2776,6 @@ gst_matroska_demux_push_codec_data_all (GstMatroskaDemux * demux) } } - GST_OBJECT_UNLOCK (demux); } static GstFlowReturn