summaryrefslogtreecommitdiff
path: root/src/subtitle_asset_internal.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-04-14 09:56:21 +0200
committerCarl Hetherington <cth@carlh.net>2021-04-16 22:49:35 +0200
commitb2ccdee3cff6ee0304c21a3e419c3210ef2061d1 (patch)
tree9f262509b4b4ca68330a43d0ed576682272b7e06 /src/subtitle_asset_internal.cc
parent3f6667d8597d40832f444d6909327b817f23785c (diff)
Improve handling of image subtitle IDs in XML (DoM bug #1965)backport
When reading/writing the XML for image subtitles, we assumed that the content of the <Image> tag is just the ID of the PNG in the MXF, without any prefix. DoM bug #1965 mentions a DCP where this is not the case, and SMPTE 429-5-2009 has an example where there is urn:uuid: in the XML. This change makes DoM write this urn:uuid: prefix, and accept it if it's present (but not complain if it's not). If the urn:uuid: _is_ required in the field, it's a bit surprising that nobody has complained up to this point. Maybe nobody noticed, or nobody reported it. Cherry-picked from 098007a1ee6a46b6ff11398f94faff5c85951da4 in master.
Diffstat (limited to 'src/subtitle_asset_internal.cc')
-rw-r--r--src/subtitle_asset_internal.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/subtitle_asset_internal.cc b/src/subtitle_asset_internal.cc
index 7b9e18e9..25e03f0b 100644
--- a/src/subtitle_asset_internal.cc
+++ b/src/subtitle_asset_internal.cc
@@ -239,7 +239,7 @@ order::Image::as_xml (xmlpp::Element* parent, Context& context) const
position_align (e, context, _h_align, _h_position, _v_align, _v_position);
if (context.standard == SMPTE) {
- e->add_child_text (_id);
+ e->add_child_text ("urn:uuid:" + _id);
} else {
e->add_child_text (_id + ".png");
}