summaryrefslogtreecommitdiff
path: root/src/lib/film.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/film.cc')
-rw-r--r--src/lib/film.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/film.cc b/src/lib/film.cc
index e463a0e35..4b3f6a8dd 100644
--- a/src/lib/film.cc
+++ b/src/lib/film.cc
@@ -906,25 +906,25 @@ Film::playlist_changed ()
AudioFrame
Film::time_to_audio_frames (DCPTime t) const
{
- return t * audio_frame_rate () / TIME_HZ;
+ return divide_with_round (t * audio_frame_rate (), TIME_HZ);
}
VideoFrame
Film::time_to_video_frames (DCPTime t) const
{
- return t * video_frame_rate () / TIME_HZ;
+ return divide_with_round (t * video_frame_rate (), TIME_HZ);
}
DCPTime
Film::audio_frames_to_time (AudioFrame f) const
{
- return f * TIME_HZ / audio_frame_rate ();
+ return divide_with_round (f * TIME_HZ, audio_frame_rate ());
}
DCPTime
Film::video_frames_to_time (VideoFrame f) const
{
- return f * TIME_HZ / video_frame_rate ();
+ return divide_with_round (f * TIME_HZ, video_frame_rate ());
}
AudioFrame