X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fsndfile_content.cc;h=844f3dd47cff204b411d6a615e4d535d3b4317d3;hb=1629bd7df2150156109afbc7a16677cb29e82adf;hp=d3acc7d2e3662a4261d56e6d077e888da4a50ede;hpb=85c65bd422742813992686c17a5e1b718cc3c449;p=dcpomatic.git diff --git a/src/lib/sndfile_content.cc b/src/lib/sndfile_content.cc index d3acc7d2e..844f3dd47 100644 --- a/src/lib/sndfile_content.cc +++ b/src/lib/sndfile_content.cc @@ -147,7 +147,7 @@ SndfileContent::full_length () const shared_ptr 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