From c2adc362e4ce0a64d7e7a1c6b634b024d862c8c1 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 21 Feb 2026 02:37:42 +0100 Subject: Handle FFmpeg content with only subtitles enabled better. Previously if some FFmpeg content was set to use only its subtitles, and the first subtitle was 1 minute in to the content, the content would be selected for pass() until its first minute had been scanned. This could be slow, and incorrect as on the way to this 1 minute we want to look at other content. Here we store the PTS of dropped packets to use as a fallback position when there is no video or audio enabled. --- src/lib/ffmpeg_decoder.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/lib/ffmpeg_decoder.h') diff --git a/src/lib/ffmpeg_decoder.h b/src/lib/ffmpeg_decoder.h index bd4b74f88..022c5625b 100644 --- a/src/lib/ffmpeg_decoder.h +++ b/src/lib/ffmpeg_decoder.h @@ -53,6 +53,7 @@ public: bool pass () override; void seek (dcpomatic::ContentTime time, bool) override; + dcpomatic::ContentTime position() const override; private: friend struct ::ffmpeg_pts_offset_test; @@ -102,4 +103,6 @@ private: }; FlushState _flush_state = FlushState::CODECS; + + std::vector> _dropped_time; }; -- cgit v1.2.3