summaryrefslogtreecommitdiff
path: root/src/mxf.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-06-04 21:55:00 +0100
committerCarl Hetherington <cth@carlh.net>2015-06-05 14:35:31 +0100
commit55686953bfecd42fac24bdf2668920954a8173be (patch)
tree3de0f280ca9b089c629ffd897bbbc25284ced6e7 /src/mxf.cc
parent3fd8e16705b3eb4dc08cf9f33a489418b069b90a (diff)
Use boost::optional for key id instead of an empty string.
Diffstat (limited to 'src/mxf.cc')
-rw-r--r--src/mxf.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mxf.cc b/src/mxf.cc
index 93ff89a5..3a7080a9 100644
--- a/src/mxf.cc
+++ b/src/mxf.cc
@@ -79,12 +79,12 @@ MXF::fill_writer_info (ASDCP::WriterInfo* writer_info, Standard standard)
Kumu::hex2bin (_id.c_str(), writer_info->AssetUUID, Kumu::UUID_Length, &c);
DCP_ASSERT (c == Kumu::UUID_Length);
- if (_key) {
+ if (_key_id) {
Kumu::GenRandomUUID (writer_info->ContextID);
writer_info->EncryptedEssence = true;
unsigned int c;
- Kumu::hex2bin (_key_id.c_str(), writer_info->CryptographicKeyID, Kumu::UUID_Length, &c);
+ Kumu::hex2bin (_key_id.get().c_str(), writer_info->CryptographicKeyID, Kumu::UUID_Length, &c);
DCP_ASSERT (c == Kumu::UUID_Length);
}
}
@@ -123,7 +123,7 @@ MXF::set_key (Key key)
{
_key = key;
- if (_key_id.empty ()) {
+ if (!_key_id) {
/* No key ID so far; we now need one */
_key_id = make_uuid ();
}