gcc: Fix deadlock on shutdown

We were holding the element .state lock while trying to shutdown leading
to a deadlock.

Fixes: https://github.com/centricular/webrtcsink/issues/90
This commit is contained in:
Thibault Saunier 2022-08-31 09:03:41 -04:00 committed by Mathieu Duponchelle
parent 8605df4b16
commit c3a1536849

View file

@ -1120,6 +1120,8 @@ impl BandwidthEstimator {
} else {
let mut state = self.state.lock().unwrap();
state.flow_return = Err(gst::FlowError::Flushing);
drop(state);
self.srcpad.stop_task()?;
}