Take Film pointer out of Content.
[dcpomatic.git] / test / ffmpeg_audio_only_test.cc
index bbeef0b11d03d1cac1d2ed9929ada0593082d3e3..8e2993e9650ebf1d75bbc568762e7d8f3688440d 100644 (file)
@@ -72,7 +72,7 @@ test (boost::filesystem::path file)
        shared_ptr<Film> film = new_test_film ("ffmpeg_audio_only_test");
        film->set_name ("test_film");
        film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TST"));
-       shared_ptr<FFmpegContent> c (new FFmpegContent (film, file));
+       shared_ptr<FFmpegContent> c (new FFmpegContent(file));
        film->examine_and_add_content (c);
        wait_for_jobs ();
        film->write_metadata ();
@@ -122,7 +122,7 @@ BOOST_AUTO_TEST_CASE (ffmpeg_audio_only_test1)
        shared_ptr<dcp::SoundAssetReader> reader = asset.start_read ();
        for (int i = 0; i < asset.intrinsic_duration(); ++i) {
                shared_ptr<const dcp::SoundFrame> frame = reader->get_frame(i);
-               sf_count_t this_time = min (info.frames, 2000L);
+               sf_count_t this_time = min (info.frames, sf_count_t(2000));
                sf_readf_short (ref, buffer, this_time);
                for (int j = 0; j < this_time; ++j) {
                        BOOST_REQUIRE_EQUAL (frame->get(2, j) >> 8, buffer[j]);
@@ -152,7 +152,7 @@ BOOST_AUTO_TEST_CASE (ffmpeg_audio_only_test2)
        shared_ptr<dcp::SoundAssetReader> reader = asset.start_read ();
        for (int i = 0; i < asset.intrinsic_duration(); ++i) {
                shared_ptr<const dcp::SoundFrame> frame = reader->get_frame(i);
-               sf_count_t this_time = min (info.frames, 2000L);
+               sf_count_t this_time = min (info.frames, sf_count_t(2000));
                sf_readf_int (ref, buffer, this_time);
                for (int j = 0; j < this_time; ++j) {
                        int32_t s = frame->get(2, j);
@@ -186,7 +186,7 @@ BOOST_AUTO_TEST_CASE (ffmpeg_audio_only_test3)
        shared_ptr<dcp::SoundAssetReader> reader = asset.start_read ();
        for (int i = 0; i < asset.intrinsic_duration(); ++i) {
                shared_ptr<const dcp::SoundFrame> frame = reader->get_frame(i);
-               sf_count_t this_time = min (info.frames, 2000L);
+               sf_count_t this_time = min (info.frames, sf_count_t(2000));
                sf_readf_int (ref, buffer, this_time);
                for (int j = 0; j < this_time; ++j) {
                        int32_t s = frame->get(2, j);