summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2026-02-21 02:35:07 +0100
committerCarl Hetherington <cth@carlh.net>2026-02-21 02:35:07 +0100
commit6c562ac01da72e8b296a360b50642175b6430821 (patch)
tree151286276eeb427505c32b1ed270ce3b7c61671c /src
parente1fbf78fb369fe2788f4777dff7982b058a72b27 (diff)
Prevent attempts to seek beyond the film's length...
...as they cause problems.
Diffstat (limited to 'src')
-rw-r--r--src/lib/player.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc
index 9fd535c43..58b58fe61 100644
--- a/src/lib/player.cc
+++ b/src/lib/player.cc
@@ -1422,6 +1422,8 @@ Player::seek(DCPTime time, bool accurate)
_audio_merger.clear();
std::for_each(_active_texts.begin(), _active_texts.end(), [](ActiveText& a) { a.clear(); });
+ time = std::min(time, film->length());
+
for (auto i: _pieces) {
if (time < i->content->position()) {
/* Before; seek to the start of the content. Even if this request is for an inaccurate seek