Fix console noise when importing non-DCP MXFs (#1362).
[dcpomatic.git] / src / lib / atmos_mxf_content.cc
index 2fd9ead068cf3f9130afcd0d9efe9ec486277e19..a42b1095429fd35a467685185fce2f8f50be5905 100644 (file)
@@ -22,6 +22,7 @@
 #include "job.h"
 #include "film.h"
 #include "compose.hpp"
+#include <asdcp/KM_log.h>
 #include <dcp/atmos_asset.h>
 #include <dcp/exceptions.h>
 #include <libxml++/libxml++.h>
@@ -47,6 +48,8 @@ AtmosMXFContent::AtmosMXFContent (shared_ptr<const Film> film, cxml::ConstNodePt
 bool
 AtmosMXFContent::valid_mxf (boost::filesystem::path path)
 {
+       Kumu::DefaultLogSink().UnsetFilterFlag(Kumu::LOG_ALLOW_ALL);
+
        try {
                shared_ptr<dcp::AtmosAsset> a (new dcp::AtmosAsset (path));
                return true;
@@ -56,6 +59,8 @@ AtmosMXFContent::valid_mxf (boost::filesystem::path path)
 
        }
 
+       Kumu::DefaultLogSink().SetFilterFlag(Kumu::LOG_ALLOW_ALL);
+
        return false;
 }