Message formatting tweaks.
[libdcp.git] / src / reel_closed_caption_asset.cc
index 435c3438c0cb3e45fff5fab6d3515b8719a3b43f..9ddd81a6602a2e1cddf586d86b2dfec051df05b6 100644 (file)
@@ -99,13 +99,8 @@ ReelClosedCaptionAsset::key_type () const
 xmlpp::Node *
 ReelClosedCaptionAsset::write_to_cpl (xmlpp::Node* node, Standard standard) const
 {
-       xmlpp::Node* asset = write_to_cpl_base (node, standard, hash());
-
-        if (key_id()) {
-               /* Find <Hash> */
-               xmlpp::Node* hash = find_child (asset, "Hash");
-               asset->add_child_before(hash, "KeyId")->add_child_text("urn:uuid:" + key_id().get());
-       }
+       xmlpp::Node* asset = write_to_cpl_asset (node, standard, hash());
+       write_to_cpl_mxf (asset);
 
        if (_language) {
                asset->add_child("Language")->add_child_text(*_language);