Browse Source

Moved libsrtp initialization to global init

Paul-Louis Ageneau 5 years ago
parent
commit
c74777b829
1 changed files with 10 additions and 0 deletions
  1. 10 0
      src/init.cpp

+ 10 - 0
src/init.cpp

@@ -26,6 +26,10 @@
 #include "tlstransport.hpp"
 #endif
 
+#if RTC_ENABLE_MEDIA
+#include "dtlssrtptransport.hpp"
+#endif
+
 #ifdef _WIN32
 #include <winsock2.h>
 #endif
@@ -70,6 +74,9 @@ Init::Init() {
 #if RTC_ENABLE_WEBSOCKET
 	TlsTransport::Init();
 #endif
+#if RTC_ENABLE_MEDIA
+	DtlsSrtpTransport::Init();
+#endif
 }
 
 Init::~Init() {
@@ -78,6 +85,9 @@ Init::~Init() {
 #if RTC_ENABLE_WEBSOCKET
 	TlsTransport::Cleanup();
 #endif
+#if RTC_ENABLE_MEDIA
+	DtlsSrtpTransport::Cleanup();
+#endif
 
 #ifdef _WIN32
 	WSACleanup();