Add and use new FrameRateChange constructors.
[dcpomatic.git] / src / lib / dcp_content.cc
index 0bd28a9e37de0d1ce51d5e4a7bdb7e9fc86fba1e..3110f93ad5eb6b61abf18ceb1e752da5f7647b7b 100644 (file)
@@ -342,7 +342,7 @@ DCPContent::full_length (shared_ptr<const Film> film) const
        if (!video) {
                return DCPTime();
        }
-       FrameRateChange const frc (active_video_frame_rate(film), film->video_frame_rate());
+       FrameRateChange const frc (film, shared_from_this());
        return DCPTime::from_frames (llrint(video->length() * frc.factor()), film->video_frame_rate());
 }
 
@@ -612,7 +612,7 @@ DCPContent::can_reference_audio (shared_ptr<const Film> film, string& why_not) c
 {
        shared_ptr<DCPDecoder> decoder;
        try {
-               decoder.reset (new DCPDecoder (shared_from_this(), false));
+               decoder.reset (new DCPDecoder (film, shared_from_this(), false));
        } catch (dcp::DCPReadError) {
                /* We couldn't read the DCP, so it's probably missing */
                return false;
@@ -647,8 +647,9 @@ DCPContent::can_reference_text (shared_ptr<const Film> film, TextType type, stri
 {
        shared_ptr<DCPDecoder> decoder;
        try {
-               decoder.reset (new DCPDecoder (shared_from_this(), false));
+               decoder.reset (new DCPDecoder (film, shared_from_this(), false));
        } catch (dcp::DCPReadError) {
+
                /* We couldn't read the DCP, so it's probably missing */
                return false;
        } catch (dcp::KDMDecryptionError) {