From: Kostya Shishkov Date: Sat, 9 Nov 2024 16:56:17 +0000 (+0100) Subject: videplayer: fix a crash during laggy playback X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=4fcc82f9e1a511775269aacdce2e6a69b551d893;p=nihav-player.git videplayer: fix a crash during laggy playback --- 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; }