fallbackswitch: Use cancel_timeout in schedule_timeout

Dedupe the code and use the function that does the exact same thing.
This commit is contained in:
Jan Alexander Steffens (heftig) 2022-06-02 11:06:31 +02:00
parent f7f65e5bcb
commit 90ad761d83
No known key found for this signature in database
GPG key ID: 3B94A80E50A477C7

View file

@ -500,10 +500,7 @@ impl FallbackSwitch {
settings: &Settings,
running_time: gst::ClockTime,
) {
/* clear any previous timeout */
if let Some(clock_id) = state.timeout_clock_id.take() {
clock_id.unschedule();
}
state.cancel_timeout();
let clock = match element.clock() {
None => return,