Fix test logging setup to actually work.
authorCarl Hetherington <cth@carlh.net>
Thu, 14 Oct 2021 22:30:27 +0000 (00:30 +0200)
committerCarl Hetherington <cth@carlh.net>
Fri, 15 Oct 2021 17:49:36 +0000 (19:49 +0200)
test/ffmpeg_encoder_test.cc

index c3e8c9a81a8ccafa2713eac29325be836c8dbf41..993da4d2348a84e32d9a681900092b81bad1c846 100644 (file)
@@ -24,6 +24,7 @@
 #include "lib/config.h"
 #include "lib/content_factory.h"
 #include "lib/dcp_content.h"
+#include "lib/dcpomatic_log.h"
 #include "lib/ffmpeg_content.h"
 #include "lib/ffmpeg_encoder.h"
 #include "lib/ffmpeg_examiner.h"
@@ -471,8 +472,8 @@ BOOST_AUTO_TEST_CASE (ffmpeg_encoder_prores_regression_1)
 /** Regression test for Butler video buffers reached 480 frames (audio is 0) (#2101) */
 BOOST_AUTO_TEST_CASE (ffmpeg_encoder_prores_regression_2)
 {
-       auto logs = Config::instance()->log_types();
-       Config::instance()->set_log_types(logs | LogEntry::TYPE_DEBUG_PLAYER);
+       auto logs = dcpomatic_log->types();
+       dcpomatic_log->set_types(logs | LogEntry::TYPE_DEBUG_PLAYER);
 
        auto content = content_factory(TestPaths::private_data() / "tge_clip.mkv").front();
        auto film = new_test_film2 ("ffmpeg_encoder_prores_regression_2", { content });
@@ -481,6 +482,6 @@ BOOST_AUTO_TEST_CASE (ffmpeg_encoder_prores_regression_2)
        FFmpegEncoder encoder (film, job, "build/test/ffmpeg_encoder_prores_regression_2.mov", ExportFormat::PRORES, false, true, false, 23);
        encoder.go ();
 
-       Config::instance()->set_log_types(logs);
+       dcpomatic_log->set_types(logs);
 }