summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-08-26 01:32:22 +0100
committerCarl Hetherington <cth@carlh.net>2015-08-26 01:32:22 +0100
commitd5066f2051d91b638f39bd22d5f82154accd1af2 (patch)
tree4b9a05b068483c50cf94ef4c583bd54e8fb8a940 /src/lib
parent32823e7cc89965bf706fecab13be444e5a2aaa09 (diff)
Revert "Replace _floor with _round in dcp_to_content_video. _floor breaks
playback on Win XP 32 as the player keeps requesting the same frame from the decoder rather than the next one." This reverts commit e386b94425586760374d8e1cb16be99af09cf07f. The actual cause of the Win XP 32 bug appears to be -ffast-math.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/player.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc
index a40c65cd5..d2ef1a5ff 100644
--- a/src/lib/player.cc
+++ b/src/lib/player.cc
@@ -524,7 +524,10 @@ Player::dcp_to_content_video (shared_ptr<const Piece> piece, DCPTime t) const
shared_ptr<const VideoContent> vc = dynamic_pointer_cast<const VideoContent> (piece->content);
DCPTime s = t - piece->content->position ();
s = min (piece->content->length_after_trim(), s);
- return max (ContentTime (), ContentTime (s, piece->frc) + piece->content->trim_start ()).frames_round (vc->video_frame_rate ());
+ /* We're returning a frame index here so we need to floor() the conversion since we want to know the frame
+ that contains t, I think
+ */
+ return max (ContentTime (), ContentTime (s, piece->frc) + piece->content->trim_start ()).frames_floor (vc->video_frame_rate ());
}
DCPTime