videoplayer: set initial timestamp when available
authorKostya Shishkov <kostya.shishkov@gmail.com>
Sat, 17 Jun 2023 14:06:32 +0000 (16:06 +0200)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Sat, 17 Jun 2023 14:06:32 +0000 (16:06 +0200)
videoplayer/src/main.rs

index 0b4446d0a969dd1725652c6ee9936164072a4a50..08b43cb55044dc11f2acf6fe50aafa69112efb50 100644 (file)
@@ -672,7 +672,7 @@ impl Player {
 
         // play
         self.prefill(&mut dmx, &mut disp_q);
-        self.tkeep.reset_all(0);
+        self.tkeep.reset_all(if !disp_q.is_empty() { disp_q.first_ts } else { 0 });
         if !self.paused {
             self.acontrol.resume();
         }