From 4fcc82f9e1a511775269aacdce2e6a69b551d893 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Sat, 9 Nov 2024 17:56:17 +0100 Subject: [PATCH] videplayer: fix a crash during laggy playback --- videoplayer/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/videoplayer/src/main.rs b/videoplayer/src/main.rs index 82fb56f..bd60310 100644 --- a/videoplayer/src/main.rs +++ b/videoplayer/src/main.rs @@ -320,7 +320,7 @@ fn try_display(disp_queue: &mut DispQueue, canvas: &mut Canvas, osd: &mu disp_queue.move_start(); if !disp_queue.is_empty() { - return Some((disp_queue.first_ts - ctime).saturating_sub(2)); + return Some(disp_queue.first_ts.saturating_sub(ctime).saturating_sub(2)); } else { return None; } -- 2.39.5