From dfef138e9df5ab5e24ebc6cb6e343aeca4f75ef4 Mon Sep 17 00:00:00 2001 From: Josh Holmer Date: Fri, 17 Sep 2021 09:28:24 -0400 Subject: [PATCH] Fix an inconsistency with rav1e --- src/lib.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 1dd30a4..22ffe10 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -158,11 +158,13 @@ pub fn detect_scene_changes( // End of video break; } - if detector.analyze_next_frame( - &frame_set, - frameno as u64, - *keyframes.iter().last().unwrap(), - ) { + if frameno == 0 + || detector.analyze_next_frame( + &frame_set, + frameno as u64, + *keyframes.iter().last().unwrap(), + ) + { keyframes.insert(frameno as u64); };