Skip to content

Commit

Permalink
videosource: Do not force a seek on init if we can't seek
Browse files Browse the repository at this point in the history
This was a regression introduced in 6467a17.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
  • Loading branch information
dwbuiten committed Jun 20, 2024
1 parent 7ed5e4d commit 25cef14
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/core/videosource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 25cef14

Please sign in to comment.