gst-plugins-rs/utils/togglerecord
François Laignel a1c89dd17b utils/togglerecord: fix race condition checking other streams EOS state
Function `check_and_update_stream_start` checks whether other streams
reached EOS. The stream being checked might already have locked its
state. If it's about to check other streams too, this results in a
deadlock.

The problem was due to the `main_state` guard being dropped handling
event `StreamStart` checking whether the main stream is EOS:

```rust
    let main_is_eos = if let Some(main_state) = main_state {
        main_state.eos
    } else {
        false
    };
```

In the above code, `main_state` main state is comsumed and dropped
after evaluating `main_state.eos`.

This is also the case before handling event `Eos`.

This revealed another deadlock handling event `Eos` which is under
investigation.
2021-12-20 09:01:09 +00:00
..
examples adapt to ObjectExt improvements 2021-11-08 14:43:53 +02:00
src utils/togglerecord: fix race condition checking other streams EOS state 2021-12-20 09:01:09 +00:00
tests adapt to ObjectExt improvements 2021-11-08 14:43:53 +02:00
build.rs fix-getters-calls 0.3.0 pass 2021-04-20 18:19:58 +02:00
Cargo.toml Update to Rust edition 2021 and minimum supported Rust version to 1.56 2021-10-31 17:40:05 +02:00
LICENSE Drop gst-plugin- prefix in plugin directory name 2020-04-05 19:10:47 +00:00
LICENSE-LGPLv2 Add LICENSE files to each individual crate 2020-07-10 13:06:28 +03:00