fallbackswitch: Minor cleanup in get_sync_time

This commit is contained in:
Vivia Nikolaidou 2022-04-11 15:57:20 +03:00
parent 3de317b3c9
commit de936f42e9

View file

@ -261,14 +261,13 @@ impl SinkState {
};
let end_ts = start_ts.saturating_add(duration);
let (start_ts, end_ts) = match self.segment.clip(start_ts, end_ts) {
Some((start_ts, end_ts)) => (start_ts, end_ts),
None => return (None, None),
};
let start_ts = self.segment.to_running_time(start_ts);
let end_ts = self.segment.to_running_time(end_ts);
(start_ts, end_ts)
match self.segment.clip(start_ts, end_ts) {
Some((start_ts, end_ts)) => (
self.segment.to_running_time(start_ts),
self.segment.to_running_time(end_ts),
),
None => (None, None),
}
}
fn schedule_clock(