Don't write a <ContentVersion> tag with an empty <LabelText> (#2191).
authorCarl Hetherington <cth@carlh.net>
Sun, 27 Feb 2022 22:45:46 +0000 (23:45 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 9 Mar 2022 16:04:02 +0000 (17:04 +0100)
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.

src/lib/writer.cc

index 8b51eb58759a1364ed9af4fc80ff388401b164e1..f14ef49ef320b8a7ca9cfd57cd0211d9ae526e5f 100644 (file)
@@ -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());