aggregator: Take the stream lock when iterating sink pads
authorNirbheek Chauhan <nirbheek@centricular.com>
Fri, 26 Dec 2014 22:49:52 +0000 (04:19 +0530)
committerTim-Philipp Müller <tim@centricular.com>
Sat, 2 Dec 2017 15:10:26 +0000 (15:10 +0000)
commitbbde713640a3e475a6c327f111fd3e15f729b169
tree46d1b70a3778bbcff1d5b63f390570bdac023978
parent9bac89113edbb7f15fa5e8ab5d1560d082352b5a
aggregator: Take the stream lock when iterating sink pads

When iterating sink pads to collect some data, we should take the stream lock so
we don't get stale data and possibly deadlock because of that. This fixes
a definitive deadlock in _wait_and_check() that manifests with high max
latencies in a live pipeline, and fixes other possible race conditions.
libs/gst/base/gstaggregator.c