From 25cef14386fcaaa58ee547065deee8f6e82c56a2 Mon Sep 17 00:00:00 2001 From: Derek Buitenhuis Date: Thu, 20 Jun 2024 13:55:00 +0100 Subject: [PATCH] videosource: Do not force a seek on init if we can't seek This was a regression introduced in 6467a17d70f5a2fc978b748a87c8ae2f08bc0a9c. Signed-off-by: Derek Buitenhuis --- src/core/videosource.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/core/videosource.cpp b/src/core/videosource.cpp index 018c0059c0..03335be021 100644 --- a/src/core/videosource.cpp +++ b/src/core/videosource.cpp @@ -408,6 +408,11 @@ FFMS_VideoSource::FFMS_VideoSource(const char *SourceFile, FFMS_Index &Index, in } } + // If we are in linear no-rewind mode, don't attempt to seek during init. + // Bypass the INITIALIZE_SOURCE stage. + if (SeekMode < 0) + Stage = DecodeStage::INITIALIZE; + // Cannot "output" without doing all other initialization // This is the additional mess required for seekmode=-1 to work in a reasonable way OutputFrame(DecodeFrame);