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.
This commit is contained in:
Sebastian Dröge 2022-03-16 10:25:56 +02:00 committed by Sebastian Dröge
parent e973d41bac
commit 4a54001aed

View file

@ -2107,6 +2107,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);