diff options
| author | Carl Hetherington <cth@carlh.net> | 2019-11-30 20:25:48 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2019-11-30 20:37:49 +0100 |
| commit | 70f5ab36c2b985b8b82aea3187964de41930fc94 (patch) | |
| tree | 40c453450e619cd5a9f405b13c07bf82f2cb09d4 /test/ffmpeg_encoder_test.cc | |
| parent | b69813dd682c8a0c3b7c46287b1a75c7c10f6a10 (diff) | |
Fix crash when exporting a 2D project containing 3D content (#1680).
Diffstat (limited to 'test/ffmpeg_encoder_test.cc')
| -rw-r--r-- | test/ffmpeg_encoder_test.cc | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/test/ffmpeg_encoder_test.cc b/test/ffmpeg_encoder_test.cc index d9a026160..1acfa96df 100644 --- a/test/ffmpeg_encoder_test.cc +++ b/test/ffmpeg_encoder_test.cc @@ -344,3 +344,35 @@ BOOST_AUTO_TEST_CASE (ffmpeg_encoder_h264_test6) ); encoder.go (); } + +/** Test export of a 3D DCP in a 2D project */ +BOOST_AUTO_TEST_CASE (ffmpeg_encoder_h264_test7) +{ + shared_ptr<Film> film = new_test_film2 ("ffmpeg_encoder_h264_test7_data"); + shared_ptr<Content> L (shared_ptr<ImageContent>(new ImageContent(private_data / "bbc405.png"))); + film->examine_and_add_content (L); + shared_ptr<Content> R (shared_ptr<ImageContent>(new ImageContent(private_data / "bbc405.png"))); + film->examine_and_add_content (R); + BOOST_REQUIRE (!wait_for_jobs()); + L->video->set_frame_type (VIDEO_FRAME_TYPE_3D_LEFT); + L->set_position (film, DCPTime()); + R->video->set_frame_type (VIDEO_FRAME_TYPE_3D_RIGHT); + R->set_position (film, DCPTime()); + film->set_three_d (true); + film->make_dcp (); + BOOST_REQUIRE (!wait_for_jobs()); + + shared_ptr<Film> film2 = new_test_film2 ("ffmpeg_encoder_h264_test7_export"); + shared_ptr<Content> dcp (new DCPContent(film->dir(film->dcp_name()))); + film2->examine_and_add_content (dcp); + BOOST_REQUIRE (!wait_for_jobs()); + + shared_ptr<Job> job (new TranscodeJob (film2)); + FFmpegEncoder encoder (film2, job, "build/test/ffmpeg_encoder_h264_test7.mp4", EXPORT_FORMAT_H264_AAC, true, false, 23 +#ifdef DCPOMATIC_VARIANT_SWAROOP + , optional<dcp::Key>(), optional<string>() +#endif + ); + encoder.go (); +} + |
