Silence warnings from asdcplib when testing a MXF file for validity.
authorCarl Hetherington <cth@carlh.net>
Fri, 7 Sep 2018 12:03:07 +0000 (13:03 +0100)
committerCarl Hetherington <cth@carlh.net>
Fri, 7 Sep 2018 12:03:07 +0000 (13:03 +0100)
compile_commands.json [deleted symlink]
cscript
src/smpte_subtitle_asset.cc

diff --git a/compile_commands.json b/compile_commands.json
deleted file mode 120000 (symlink)
index 25eb4b2..0000000
+++ /dev/null
@@ -1 +0,0 @@
-build/compile_commands.json
\ No newline at end of file
diff --git a/cscript b/cscript
index f9083efa5e811b3afeff7ad16636a5b33ddf5895..e645b2b49ef02d6cf8dc6dd7f52b578fbb52f948 100644 (file)
--- a/cscript
+++ b/cscript
@@ -36,9 +36,9 @@ import shutil
 
 def dependencies(target, options):
     if (target.platform == 'windows' and target.version == 'xp') or (options is not None and 'jpeg' in options and options['jpeg'] == 'oj1'):
-        return (('libcxml', 'a45e430'), ('openjpeg-cdist',  '4233dd7'), ('asdcplib-cth', 'f3b0fb8'))
+        return (('libcxml', 'a45e430'), ('openjpeg-cdist',  '4233dd7'), ('asdcplib-cth', 'b536bc0'))
     else:
-        return (('libcxml', 'a45e430'), ('openjpeg2-cdist', 'c40a3b8'), ('asdcplib-cth', 'f3b0fb8'))
+        return (('libcxml', 'a45e430'), ('openjpeg2-cdist', 'c40a3b8'), ('asdcplib-cth', 'b536bc0'))
 
 def build(target, options):
     cmd = './waf configure --disable-examples --prefix=%s' % target.directory
index b568139a952d573f0fb38f8622c19d77d48c93d3..8408a57e40217f8ecd4bacbb72ddac9855b782db 100644 (file)
@@ -47,6 +47,7 @@
 #include "subtitle_image.h"
 #include <asdcp/AS_DCP.h>
 #include <asdcp/KM_util.h>
+#include <asdcp/KM_log.h>
 #include <libxml++/libxml++.h>
 #include <boost/foreach.hpp>
 #include <boost/algorithm/string.hpp>
@@ -268,7 +269,9 @@ bool
 SMPTESubtitleAsset::valid_mxf (boost::filesystem::path file)
 {
        ASDCP::TimedText::MXFReader reader;
+       Kumu::DefaultLogSink().UnsetFilterFlag(Kumu::LOG_ALLOW_ALL);
        Kumu::Result_t r = reader.OpenRead (file.string().c_str ());
+       Kumu::DefaultLogSink().SetFilterFlag(Kumu::LOG_ALLOW_ALL);
        return !ASDCP_FAILURE (r);
 }