mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-12-23 02:26:35 +00:00
transcriberbin: Fix deadlock
Fix race between latency query handler and setup_transcription() method. Locking order of setup_transcription() is state lock -> setup_transcription() -> settings lock So taking state lock inside of setting lock in src_query() can cause deadlock.
This commit is contained in:
parent
8389bff7d8
commit
ecf03d0e5c
1 changed files with 1 additions and 1 deletions
|
@ -395,7 +395,6 @@ impl TranscriberBin {
|
|||
|
||||
if ret {
|
||||
let (_, mut min, _) = upstream_query.result();
|
||||
let settings = self.settings.lock().unwrap();
|
||||
let received_framerate = {
|
||||
let state = self.state.lock().unwrap();
|
||||
if let Some(state) = state.as_ref() {
|
||||
|
@ -405,6 +404,7 @@ impl TranscriberBin {
|
|||
}
|
||||
};
|
||||
|
||||
let settings = self.settings.lock().unwrap();
|
||||
if settings.passthrough || !received_framerate {
|
||||
min += settings.latency + settings.accumulate_time;
|
||||
} else if settings.mode.is_rollup() {
|
||||
|
|
Loading…
Reference in a new issue