summaryrefslogtreecommitdiff
path: root/src/MXF.cpp
diff options
context:
space:
mode:
authorjhurst <jhurst@cinecert.com>2018-07-23 15:44:25 +0000
committerjhurst <>2018-07-23 15:44:25 +0000
commit3f512b8db277d1e5e8dc516d06a5df3fdc90723b (patch)
tree22fcbec3da56659dacf8af40bb4c56c3244d5b36 /src/MXF.cpp
parentea479d79e5ed58adb09bdcf9acef36b57d861db2 (diff)
o Fixed soundfield split-syntax fault (was tagging out-of-group channels with the LinkID)
o Added asdcp.decode_mca_string() subroutine
Diffstat (limited to 'src/MXF.cpp')
-rwxr-xr-xsrc/MXF.cpp19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/MXF.cpp b/src/MXF.cpp
index 049953c..df53b21 100755
--- a/src/MXF.cpp
+++ b/src/MXF.cpp
@@ -1493,7 +1493,7 @@ ASDCP::MXF::decode_mca_string(const std::string& s, const mca_label_map_t& label
{
std::string symbol_buf;
channel_count = 0;
- ASDCP::MXF::SoundfieldGroupLabelSubDescriptor *current_soundfield = 0;
+ ASDCP::MXF::SoundfieldGroupLabelSubDescriptor *current_soundfield = 0, *prev_soundfield = 0;
std::string::const_iterator i;
for ( i = s.begin(); i != s.end(); ++i )
@@ -1512,12 +1512,21 @@ ASDCP::MXF::decode_mca_string(const std::string& s, const mca_label_map_t& label
}
else if ( symbol_buf.empty() )
{
- DefaultLogSink().Error("Encountered '(', without leading soundfield group symbol.\n");
- return false;
+ if ( prev_soundfield != 0 )
+ {
+ current_soundfield = prev_soundfield;
+ // appending to the existing soundfield group
+ continue;
+ }
+ else
+ {
+ DefaultLogSink().Error("Encountered '(', without leading soundfield group symbol.\n");
+ return false;
+ }
}
mca_label_map_t::const_iterator i = labels.find(symbol_buf);
-
+
if ( i == labels.end() )
{
DefaultLogSink().Error("Unknown symbol: '%s'\n", symbol_buf.c_str());
@@ -1538,6 +1547,7 @@ ASDCP::MXF::decode_mca_string(const std::string& s, const mca_label_map_t& label
current_soundfield->RFC5646SpokenLanguage = language;
current_soundfield->MCALabelDictionaryID = i->second.ul;
descriptor_list.push_back(reinterpret_cast<ASDCP::MXF::InterchangeObject*>(current_soundfield));
+ prev_soundfield = current_soundfield;
symbol_buf.clear();
}
else if ( *i == ')' )
@@ -1576,6 +1586,7 @@ ASDCP::MXF::decode_mca_string(const std::string& s, const mca_label_map_t& label
channel_descr->MCALabelDictionaryID = i->second.ul;
descriptor_list.push_back(reinterpret_cast<ASDCP::MXF::InterchangeObject*>(channel_descr));
symbol_buf.clear();
+ current_soundfield = 0;
}
else if ( *i == ',' )
{