From 0f1d1ded7e5a834a04464efadd6dc46094e1f1d9 Mon Sep 17 00:00:00 2001 From: ziyue <1213642868@qq.com> Date: Fri, 25 Jun 2021 18:08:03 +0800 Subject: [PATCH] =?UTF-8?q?rid=E6=94=AF=E6=8C=81=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webrtc/RtpExt.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/webrtc/RtpExt.cpp b/webrtc/RtpExt.cpp index dfbf10a0..bf749fa9 100644 --- a/webrtc/RtpExt.cpp +++ b/webrtc/RtpExt.cpp @@ -623,7 +623,9 @@ void RtpExtContext::changeRtpExtId(const RtpHeader *header, bool is_recv, string rid = _ssrc_to_rid[ssrc]; } else { //设置rid - if (_ssrc_to_rid.emplace(ssrc, rid).second) { + auto it = _ssrc_to_rid.find(ssrc); + if (it == _ssrc_to_rid.end() || it->second != rid) { + _ssrc_to_rid[ssrc] = rid; onGetRtp(header->pt, ssrc, rid); } }