From fecfbbe101de330eb007b82e2dc8005f0d907304 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=8F=E6=A5=9A?= <771730766@qq.com> Date: Mon, 9 Oct 2017 11:24:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dwindows=E4=B8=8B=E7=BC=96?= =?UTF-8?q?=E8=AF=91=E4=B8=8D=E8=BF=87=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Rtsp/RtpBroadCaster.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Rtsp/RtpBroadCaster.cpp b/src/Rtsp/RtpBroadCaster.cpp index 68b561e0..ab985234 100644 --- a/src/Rtsp/RtpBroadCaster.cpp +++ b/src/Rtsp/RtpBroadCaster.cpp @@ -25,9 +25,11 @@ */ #include +#include #include "RtpBroadCaster.h" #include "Util/util.h" #include "Network/sockutil.h" +using namespace std; namespace ZL { namespace Rtsp { @@ -116,7 +118,7 @@ RtpBroadCaster::RtpBroadCaster(const string &strLocalIp,const string &strApp,con unordered_map m_mapDetach_copy; { lock_guard lck(m_mtx); - m_mapDetach_copy.swap(m_mapDetach); + m_mapDetach_copy = std::move(m_mapDetach); } for(auto &pr : m_mapDetach_copy){ pr.second();