matroskademux: don't hold object lock whilst pushing out headers
authorSeungha Yang <sh.yang@lge.com>
Thu, 19 May 2016 06:36:57 +0000 (15:36 +0900)
committerTim-Philipp Müller <tim@centricular.com>
Thu, 19 May 2016 21:01:53 +0000 (22:01 +0100)
commiteb09829a1c1987373ae433daca6420ea6c0fb908
tree5f9ecb622645bb8cd8e496353a6722dbadc7858c
parente2b21850295c2db661bff8b42627d00984c7aab2
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
gst/matroska/matroska-demux.c