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 Arun Raghavan
parent 930f51edbc
commit 191b1644d6

View file

@ -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);