diff options
| author | Carl Hetherington <cth@carlh.net> | 2026-02-21 02:37:42 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2026-02-21 02:37:42 +0100 |
| commit | c2adc362e4ce0a64d7e7a1c6b634b024d862c8c1 (patch) | |
| tree | 1cce02f73de9aed44e25add73606b59485d1dbea /src/lib/ffmpeg_decoder.h | |
| parent | 6c562ac01da72e8b296a360b50642175b6430821 (diff) | |
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.
Diffstat (limited to 'src/lib/ffmpeg_decoder.h')
| -rw-r--r-- | src/lib/ffmpeg_decoder.h | 3 |
1 files changed, 3 insertions, 0 deletions
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<boost::optional<dcpomatic::ContentTime>> _dropped_time; }; |
