From: Carl Hetherington Date: Sun, 27 Feb 2022 22:45:46 +0000 (+0100) Subject: Don't write a tag with an empty (#2191). X-Git-Tag: v2.16.6~5 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=566d282b5c3105b175088b0df308f1dab85279e2 Don't write a tag with an empty (#2191). I can't see the problem with this, but apparently Dolby CineInspect complains about it. We could fix this in libdcp but I think that would make more sense if this were related to a definite standard violation, instead of just some tinkering to hide a possibly-incorrect warning. --- diff --git a/src/lib/writer.cc b/src/lib/writer.cc index 8b51eb587..f14ef49ef 100644 --- a/src/lib/writer.cc +++ b/src/lib/writer.cc @@ -629,6 +629,9 @@ Writer::finish (boost::filesystem::path output_dcp) for (auto i: film()->content_versions()) { cv.push_back (dcp::ContentVersion(i)); } + if (cv.empty()) { + cv = { dcp::ContentVersion("1") }; + } cpl->set_content_versions (cv); cpl->set_full_content_title_text (film()->name());