diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2022-03-16 11:25:56 +0300 |
---|---|---|
committer | Arun Raghavan <arun@asymptotic.io> | 2022-03-21 11:20:07 +0300 |
commit | 191b1644d6866cb0220b6668151845d9631bf25d (patch) | |
tree | 1e982e38cb54ea1733b67a1bb375cc6d4dabe81a | |
parent | 930f51edbc50da8ca6fde685de2446df3933313d (diff) |
fallbacksrc: Flush source before restarting on errors
It might still be blocked downstream for a while, e.g. in the clocksync.
Flushing does not cause any problems as fallbackswitch is not going to
forward it and will only unblock everything up to there.
-rw-r--r-- | utils/fallbackswitch/src/fallbacksrc/imp.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/utils/fallbackswitch/src/fallbacksrc/imp.rs b/utils/fallbackswitch/src/fallbacksrc/imp.rs index b4e68190c..88e760128 100644 --- a/utils/fallbackswitch/src/fallbacksrc/imp.rs +++ b/utils/fallbackswitch/src/fallbacksrc/imp.rs @@ -2108,6 +2108,9 @@ impl FallbackSrc { } drop(state_guard); + gst_debug!(CAT, obj: element, "Flushing source"); + let _ = source.send_event(gst::event::FlushStart::builder().build()); + gst_debug!(CAT, obj: element, "Shutting down source"); let _ = source.set_state(gst::State::Null); |