summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-01-17 11:14:32 +0100
committerCarl Hetherington <cth@carlh.net>2025-01-18 21:06:40 +0100
commitef2eb8521358684042807dfcec62ce0e5639ec8d (patch)
tree15d0e21d870399f30ca0f658a428e4f22a7fcce5 /src/lib
parent10c45dc1418bc8c4766ec2c189dc78162d4664dd (diff)
Fix first frame being shown even when trimmed (#2952).
We calculated the DCP time of the first frame (when its content was trimmed) and it was clamped from -8 frames to 0, which meant it was used when it should not have been.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/player.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc
index f348f6b28..1f44c961c 100644
--- a/src/lib/player.cc
+++ b/src/lib/player.cc
@@ -608,7 +608,7 @@ Player::dcp_to_content_time (shared_ptr<const Piece> piece, DCPTime t) const
DCPTime
Player::content_time_to_dcp (shared_ptr<const Piece> piece, ContentTime t) const
{
- return max (DCPTime(), DCPTime(t - piece->content->trim_start(), piece->frc) + piece->content->position());
+ return DCPTime(t - piece->content->trim_start(), piece->frc) + piece->content->position();
}