From de936f42e91fd2ce0c32f42eb97fcbbe27d76dd6 Mon Sep 17 00:00:00 2001 From: Vivia Nikolaidou Date: Mon, 11 Apr 2022 15:57:20 +0300 Subject: [PATCH] fallbackswitch: Minor cleanup in get_sync_time --- utils/fallbackswitch/src/fallbackswitch/imp.rs | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/utils/fallbackswitch/src/fallbackswitch/imp.rs b/utils/fallbackswitch/src/fallbackswitch/imp.rs index 9d1aa0a5..78701220 100644 --- a/utils/fallbackswitch/src/fallbackswitch/imp.rs +++ b/utils/fallbackswitch/src/fallbackswitch/imp.rs @@ -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(