summaryrefslogtreecommitdiff
path: root/src/lib/writer.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2023-08-12 00:13:08 +0200
committerCarl Hetherington <cth@carlh.net>2023-08-12 00:13:08 +0200
commit3472cd4dc301beb7db39419e922fc0b02cf36cf4 (patch)
treef29ec76856e15b97f7f9e9b6a6cc9f853f5231e4 /src/lib/writer.cc
parentd5898263e49c5a44110f7d5745bda3a00dcbdb8b (diff)
Prevent empty <LabelText> in <ContentVersion> (#2594).
Diffstat (limited to 'src/lib/writer.cc')
-rw-r--r--src/lib/writer.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/writer.cc b/src/lib/writer.cc
index 8b8ab89de..1ccf7c759 100644
--- a/src/lib/writer.cc
+++ b/src/lib/writer.cc
@@ -616,7 +616,10 @@ Writer::finish (boost::filesystem::path output_dcp)
vector<dcp::ContentVersion> cv;
for (auto i: film()->content_versions()) {
- cv.push_back (dcp::ContentVersion(i));
+ /* Make sure we don't end up writing an empty <LabelText> node as some validators
+ * complain about that.
+ */
+ cv.push_back(!i.empty() ? dcp::ContentVersion(i) : dcp::ContentVersion("1"));
}
if (cv.empty()) {
cv = { dcp::ContentVersion("1") };