From c488ce3dc907dd0c8ee1dd20fd07a7e83ab3466b Mon Sep 17 00:00:00 2001 From: DasEtwas <18222134+DasEtwas@users.noreply.github.com> Date: Sat, 13 Mar 2021 11:17:26 +0100 Subject: [PATCH] Fix input source timestamp pre-input argument decimal formatting (#45) --- src/input/restartable.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/input/restartable.rs b/src/input/restartable.rs index 5cb29108b..0c1c167ef 100644 --- a/src/input/restartable.rs +++ b/src/input/restartable.rs @@ -186,7 +186,7 @@ where .unwrap_or_else(|_e| (false, Default::default())); let stereo_val = if is_stereo.0 { "2" } else { "1" }; - let ts = format!("{}.{}", time.as_secs(), time.subsec_millis()); + let ts = format!("{:.3}", time.as_secs_f64()); _ffmpeg_optioned( self.path.as_ref(), &["-ss", &ts], @@ -230,7 +230,7 @@ where { async fn call_restart(&mut self, time: Option) -> Result { if let Some(time) = time { - let ts = format!("{}.{}", time.as_secs(), time.subsec_millis()); + let ts = format!("{:.3}", time.as_secs_f64()); _ytdl(self.uri.as_ref(), &["-ss", &ts]).await } else {