Merge master.
[dcpomatic.git] / src / lib / sndfile_content.cc
index d3acc7d2e3662a4261d56e6d077e888da4a50ede..844f3dd47cff204b411d6a615e4d535d3b4317d3 100644 (file)
@@ -147,7 +147,7 @@ SndfileContent::full_length () const
        shared_ptr<const Film> film = _film.lock ();
        assert (film);
 
-       AudioFrame const len = audio_length() * output_audio_frame_rate() / content_audio_frame_rate ();
+       AudioFrame const len = divide_with_round (audio_length() * output_audio_frame_rate(), content_audio_frame_rate ());
        
        /* XXX: this depends on whether, alongside this audio, we are running video slower or faster than
           it should be.  The calculation above works out the output audio frames assuming that we are just