diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-05-27 14:22:48 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-05-27 14:25:17 +0200 |
| commit | dd672d926e3b88cbe42b0778fda397d9e858b592 (patch) | |
| tree | 1f30fe44ed09b2a588f87f17c8a58d2a7e00eb8f /src/smpte_subtitle_asset.cc | |
| parent | a6a1294944d4ce02cbb429ca1aec07ca78d79a88 (diff) | |
Make similar changes to the previous commit for _xml_id.
This is also unavailable if the asset is encrypted.
Diffstat (limited to 'src/smpte_subtitle_asset.cc')
| -rw-r--r-- | src/smpte_subtitle_asset.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/smpte_subtitle_asset.cc b/src/smpte_subtitle_asset.cc index d0fbc0eb..11450ef3 100644 --- a/src/smpte_subtitle_asset.cc +++ b/src/smpte_subtitle_asset.cc @@ -347,7 +347,8 @@ SMPTESubtitleAsset::xml_as_string () const root->set_namespace_declaration (subtitle_smpte_ns, "dcst"); root->set_namespace_declaration ("http://www.w3.org/2001/XMLSchema", "xs"); - root->add_child("Id", "dcst")->add_child_text ("urn:uuid:" + _xml_id); + DCP_ASSERT (_xml_id); + root->add_child("Id", "dcst")->add_child_text ("urn:uuid:" + *_xml_id); root->add_child("ContentTitleText", "dcst")->add_child_text (_content_title_text); if (_annotation_text) { root->add_child("AnnotationText", "dcst")->add_child_text (_annotation_text.get ()); @@ -422,7 +423,8 @@ SMPTESubtitleAsset::write (boost::filesystem::path p) const descriptor.NamespaceName = subtitle_smpte_ns; unsigned int c; - Kumu::hex2bin (_xml_id.c_str(), descriptor.AssetID, ASDCP::UUIDlen, &c); + DCP_ASSERT (_xml_id); + Kumu::hex2bin (_xml_id->c_str(), descriptor.AssetID, ASDCP::UUIDlen, &c); DCP_ASSERT (c == Kumu::UUID_Length); descriptor.ContainerDuration = _intrinsic_duration; |
