summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-08-25 19:35:03 +0100
committerCarl Hetherington <cth@carlh.net>2015-08-25 21:04:51 +0100
commite386b94425586760374d8e1cb16be99af09cf07f (patch)
tree99248d224bce3d4715e9a09a50fc2555f74618f7 /src/lib
parentfb5167c9bf8b0063c9ee49b52ecd8d8118d3c27b (diff)
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.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/player.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc
index 3ceaac8c1..c51f80067 100644
--- a/src/lib/player.cc
+++ b/src/lib/player.cc
@@ -524,10 +524,7 @@ 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);
- /* 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 ());
+ return max (ContentTime (), ContentTime (s, piece->frc) + piece->content->trim_start ()).frames_round (vc->video_frame_rate ());
}
DCPTime