summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-03-07 21:42:36 +0000
committerCarl Hetherington <cth@carlh.net>2018-03-07 21:42:36 +0000
commitf0bb6cc4846d24b0b3d67ae9329e08a387981b66 (patch)
tree272f7e0d5ed4e7b5a4d0db583d429adc5d493936
parent1e110f7446adab91b5ddaaca9e9f6207ffcfdd37 (diff)
parentd516d8e159e99d7b3b8250f39f976574df072cd8 (diff)
Merge branch 'master' of ssh://git.carlh.net/home/carl/git/dcpomatic
-rw-r--r--ChangeLog4
-rw-r--r--src/lib/writer.cc5
-rw-r--r--test/remake_id_test.cc11
3 files changed, 15 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 3e9e5a24b..3bf12175c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2018-03-07 Carl Hetherington <cth@carlh.net>
+
+ * Fix bad DCPs when re-making in encrypted projects (#1232).
+
2018-03-02 Carl Hetherington <cth@carlh.net>
* Fix bad Prores exports in some cases (#1227).
diff --git a/src/lib/writer.cc b/src/lib/writer.cc
index 227de6277..d6c3370b0 100644
--- a/src/lib/writer.cc
+++ b/src/lib/writer.cc
@@ -637,6 +637,11 @@ Writer::write_cover_sheet ()
bool
Writer::can_fake_write (Frame frame) const
{
+ if (_film->encrypted()) {
+ /* We need to re-write the frame because the asset ID is embedded in the HMAC... I think... */
+ return false;
+ }
+
/* We have to do a proper write of the first frame so that we can set up the JPEG2000
parameters in the asset writer.
*/
diff --git a/test/remake_id_test.cc b/test/remake_id_test.cc
index c92f0af43..43ed16ebb 100644
--- a/test/remake_id_test.cc
+++ b/test/remake_id_test.cc
@@ -74,9 +74,10 @@ BOOST_AUTO_TEST_CASE (remake_id_test2)
film->make_dcp ();
BOOST_REQUIRE (!wait_for_jobs ());
- /* Remake it */
- film->make_dcp ();
- BOOST_REQUIRE (!wait_for_jobs ());
+ /* Remove and remake it */
+ boost::filesystem::remove_all(film->dir(film->dcp_name()));
+ film->make_dcp();
+ BOOST_REQUIRE(!wait_for_jobs());
/* Find the CPL */
optional<boost::filesystem::path> cpl;
@@ -102,11 +103,11 @@ BOOST_AUTO_TEST_CASE (remake_id_test2)
/* Import the DCP into a new film */
shared_ptr<Film> film2 = new_test_film2("remake_id_test2_2");
shared_ptr<DCPContent> dcp_content(new DCPContent(film2, film->dir(film->dcp_name())));
- film->examine_and_add_content(dcp_content);
+ film2->examine_and_add_content(dcp_content);
BOOST_REQUIRE(!wait_for_jobs());
dcp_content->add_kdm(kdm);
JobManager::instance()->add(shared_ptr<Job>(new ExamineContentJob(film2, dcp_content)));
BOOST_REQUIRE(!wait_for_jobs());
- film->make_dcp();
+ film2->make_dcp();
BOOST_REQUIRE(!wait_for_jobs());
}