Untested use of Frame for video/audio content lengths.
[dcpomatic.git] / src / lib / sndfile_content.cc
index e757c77c5469704e48c386b81199b5532bfc91b2..363c11b094dae6f0b7de869f32984229d21ad383 100644 (file)
@@ -18,7 +18,6 @@
 */
 
 #include <libcxml/cxml.h>
-#include <dcp/raw_convert.h>
 #include "sndfile_content.h"
 #include "sndfile_decoder.h"
 #include "film.h"
@@ -32,7 +31,6 @@
 using std::string;
 using std::cout;
 using boost::shared_ptr;
-using dcp::raw_convert;
 
 SndfileContent::SndfileContent (shared_ptr<const Film> f, boost::filesystem::path p)
        : Content (f, p)
@@ -95,6 +93,7 @@ SndfileContent::full_length () const
 {
        shared_ptr<const Film> film = _film.lock ();
        DCPOMATIC_ASSERT (film);
-       return DCPTime (audio_length(), film->active_frame_rate_change (position ()));
+       FrameRateChange const frc = film->active_frame_rate_change (position ());
+       return DCPTime::from_frames (audio_length() / frc.speed_up, film->audio_frame_rate ());
 }