aggregator: don't hold stream lock when flushing
authorMathieu Duponchelle <mathieu@centricular.com>
Mon, 10 Jun 2019 15:23:29 +0000 (17:23 +0200)
committerMathieu Duponchelle <mathieu@centricular.com>
Mon, 10 Jun 2019 21:04:31 +0000 (23:04 +0200)
commitc55c61eb846ff8c73166ec7a989353ce15af264d
treea50f8a10c132a4ddf5cf078f2f30f7ab655c725b
parent25383eaa5c714bc16b3bce079b42daae908eb74d
aggregator: don't hold stream lock when flushing

Releasing a GRecMutex from a different thread is undefined
behaviour.

There should be no reason to hold the stream lock from the
moment aggregator receives a flush_start until it receives
the last flush_stop: the source pad task is stopped, and can
only be restarted once the last flush_stop has arrived.

I can only speculate as to the reason why this was done,
as it was that way since the original commit. My best
guess is that aggregator originally didn't marshall events
and queries to the aggregate thread, and this somehow
helped work around this.
libs/gst/base/gstaggregator.c