From f370259c9d32711bd284a67fd9fd04d72ed48564 Mon Sep 17 00:00:00 2001 From: winlin Date: Sat, 8 May 2021 11:42:50 +0800 Subject: [PATCH] Fix build fail --- trunk/src/app/srs_app_threads.cpp | 1 + trunk/src/utest/srs_utest.cpp | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/trunk/src/app/srs_app_threads.cpp b/trunk/src/app/srs_app_threads.cpp index 898b711ef..cc17e9cd3 100644 --- a/trunk/src/app/srs_app_threads.cpp +++ b/trunk/src/app/srs_app_threads.cpp @@ -33,6 +33,7 @@ #include #include #include +#include #include using namespace std; diff --git a/trunk/src/utest/srs_utest.cpp b/trunk/src/utest/srs_utest.cpp index 92e8f72b3..ae58d887d 100644 --- a/trunk/src/utest/srs_utest.cpp +++ b/trunk/src/utest/srs_utest.cpp @@ -42,10 +42,10 @@ int _srs_tmp_port = 11935; srs_utime_t _srs_tmp_timeout = (100 * SRS_UTIME_MILLISECONDS); // kernel module. -ISrsLog* _srs_log = new MockEmptyLog(SrsLogLevelDisabled); -ISrsContext* _srs_context = new SrsThreadContext(); +ISrsLog* _srs_log = NULL; +ISrsContext* _srs_context = NULL; // app module. -SrsConfig* _srs_config = new SrsConfig(); +SrsConfig* _srs_config = NULL; SrsServer* _srs_server = NULL; bool _srs_in_docker = false; @@ -59,6 +59,9 @@ srs_error_t prepare_main() { return srs_error_wrap(err, "init st"); } + srs_freep(_srs_log); + _srs_log = new MockEmptyLog(SrsLogLevelDisabled); + if ((err = _srs_rtc_dtls_certificate->initialize()) != srs_success) { return srs_error_wrap(err, "rtc dtls certificate initialize"); }