Driver: Fix scheduler crash after task closure

A removed audio task could still have one or more driver messages left in its queue, leading to a crash when the id->mixer lookup failed. This removes an unwrap which is invalid under these assumptions and includes an extra cleanup measure for message forwarders under the same circumstances.

This was tested using `cargo make ready`.
This commit is contained in:
Kyle Simpson
2023-06-07 21:15:30 +01:00
parent c976d50cc5
commit 77e3916bdc
4 changed files with 43 additions and 19 deletions

View File

@@ -554,6 +554,7 @@ impl Live {
rtp_timestamp: id_0 as u32,
park_time: Instant::now(),
last_cost: None,
cull_handle: None,
},
id,
Instant::now(),
@@ -617,6 +618,7 @@ impl Live {
rtp_timestamp,
park_time,
last_cost: None,
cull_handle: None,
},
)
})