utils/fallbacksrc: Don't schedule a source restart timeout if the source is already pending restart

This commit is contained in:
Sebastian Dröge 2020-08-04 10:36:45 +03:00
parent 9ebcfbf333
commit a2c0d70930

View file

@ -2048,6 +2048,15 @@ impl FallbackSrc {
state: &mut State,
elapsed: gst::ClockTime,
) {
if state.source_pending_restart {
gst_debug!(
CAT,
obj: element,
"Not scheduling source restart timeout because source is pending restart already",
);
return;
}
let clock = gst::SystemClock::obtain();
let wait_time = clock.get_time()
+ gst::ClockTime::from_nseconds(state.settings.restart_timeout)