Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2022-03-16 11:25:56 +0300
committerArun Raghavan <arun@asymptotic.io>2022-03-21 11:20:07 +0300
commit191b1644d6866cb0220b6668151845d9631bf25d (patch)
tree1e982e38cb54ea1733b67a1bb375cc6d4dabe81a
parent930f51edbc50da8ca6fde685de2446df3933313d (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.rs3
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);