Skip to content
This repository was archived by the owner on Oct 23, 2024. It is now read-only.

Commit 814a0c4

Browse files
authored
Fix conflict audio MID on single PC (#829)
1 parent d91e39d commit 814a0c4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

source/core/rtc_adapter/AudioSendAdapter.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,10 @@ void AudioSendAdapterImpl::onFrame(const Frame& frame)
6666
if (!m_mid.empty()) {
6767
webrtc::RtpPacket packet(&m_extensions);
6868
packet.Parse(frame.payload, frame.length);
69-
packet.SetExtension<webrtc::RtpMid>(m_mid);
69+
if (!packet.SetExtension<webrtc::RtpMid>(m_mid)) {
70+
// Remove the extension on set failure
71+
packet.RemoveExtension(kRtpExtensionMid);
72+
}
7073
m_rtpListener->onAdapterData(
7174
reinterpret_cast<char*>(const_cast<uint8_t*>(packet.data())), packet.size());
7275
} else {

0 commit comments

Comments
 (0)