diff options
| author | Carl Hetherington <cth@carlh.net> | 2017-08-27 00:41:38 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2017-08-27 00:41:38 +0100 |
| commit | 429094f009920a14353684e83b4628bfac323617 (patch) | |
| tree | 44bf3712a088da91c9d0203c24c42b42ce36de97 | |
| parent | 1f95e564b1faec3c12869896101e1188d672a2d6 (diff) | |
Fix incorrect ISDCF name in some cases (#1118).
| -rw-r--r-- | ChangeLog | 4 | ||||
| -rw-r--r-- | src/lib/film.cc | 5 | ||||
| -rw-r--r-- | test/isdcf_name_test.cc | 6 |
3 files changed, 13 insertions, 2 deletions
@@ -1,3 +1,7 @@ +2017-08-27 Carl Hetherington <cth@carlh.net> + + * Fix incorrect ISDCF name in some cases (#1118). + 2017-08-26 Carl Hetherington <cth@carlh.net> * Stop the player looking for encode servers (#1119). diff --git a/src/lib/film.cc b/src/lib/film.cc index 0c6a55386..392bb221b 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -669,7 +669,7 @@ Film::isdcf_name (bool if_created_now) const /* XXX: this uses the first bit of content only */ - /* The standard says we don't do this for trailers, for some strange reason */ + /* Interior aspect ratio. The standard says we don't do this for trailers, for some strange reason */ if (dcp_content_type() && dcp_content_type()->libdcp_kind() != dcp::TRAILER) { Ratio const * content_ratio = 0; BOOST_FOREACH (shared_ptr<Content> i, content ()) { @@ -685,7 +685,8 @@ Film::isdcf_name (bool if_created_now) const } if (content_ratio && content_ratio != container()) { - d += "-" + content_ratio->isdcf_name(); + /* This needs to be the numeric version of the ratio, and ::id() is close enough */ + d += "-" + content_ratio->id(); } } diff --git a/test/isdcf_name_test.cc b/test/isdcf_name_test.cc index cc224aab7..f59e02edf 100644 --- a/test/isdcf_name_test.cc +++ b/test/isdcf_name_test.cc @@ -93,6 +93,12 @@ BOOST_AUTO_TEST_CASE (isdcf_name_test) film->set_dcp_content_type (DCPContentType::from_isdcf_name ("XSN")); BOOST_CHECK_EQUAL (film->isdcf_name(false), "MyNiceFilmWith_XSN-2_F-133_DE-fr_US-R_4K_DI_20140704_PP_SMPTE_OV"); + /* And it should always be numeric */ + + content->video->set_scale (VideoContentScale (Ratio::from_id ("239"))); + BOOST_CHECK_EQUAL (film->isdcf_name(false), "MyNiceFilmWith_XSN-2_F-239_DE-fr_US-R_4K_DI_20140704_PP_SMPTE_OV"); + content->video->set_scale (VideoContentScale (Ratio::from_id ("133"))); + /* Test 3D */ film->set_three_d (true); |
