From 0764e48f6c0c0a27b7fa7f2da06ed53435ed9570 Mon Sep 17 00:00:00 2001 From: gongluck Date: Thu, 18 Aug 2022 19:13:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=BC=E5=AE=B9=E5=AE=89=E5=8D=93=E5=B9=B3?= =?UTF-8?q?=E5=8F=B0=EF=BC=8Cto=5Fstring=E6=A8=A1=E6=9D=BF=E5=A4=84?= =?UTF-8?q?=E7=90=86pt=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webrtc/Sdp.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/webrtc/Sdp.cpp b/webrtc/Sdp.cpp index c48361f0..a0562e7b 100644 --- a/webrtc/Sdp.cpp +++ b/webrtc/Sdp.cpp @@ -556,7 +556,7 @@ void SdpAttrRtpMap::parse(const string &str) { string SdpAttrRtpMap::toString() const { if (value.empty()) { - value = to_string(pt) + " " + codec + "/" + to_string(sample_rate); + value = to_string((int)pt) + " " + codec + "/" + to_string(sample_rate); if (channel) { value += '/'; value += to_string(channel); @@ -574,7 +574,7 @@ void SdpAttrRtcpFb::parse(const string &str_in) { string SdpAttrRtcpFb::toString() const { if (value.empty()) { - value = to_string(pt) + " " + rtcp_type; + value = to_string((int)pt) + " " + rtcp_type; } return SdpItem::toString(); } @@ -598,7 +598,7 @@ void SdpAttrFmtp::parse(const string &str) { string SdpAttrFmtp::toString() const { if (value.empty()) { - value = to_string(pt); + value = to_string((int)pt); int i = 0; for (auto &pr : fmtp) { value += (i++ ? ';' : ' '); @@ -1070,7 +1070,7 @@ RtcSessionSdp::Ptr RtcSession::toRtcSessionSdp() const{ mline->port = m.port; mline->proto = m.proto; for (auto &p : m.plan) { - mline->fmts.emplace_back(to_string(p.pt)); + mline->fmts.emplace_back(to_string((int)p.pt)); } if (m.type == TrackApplication) { mline->fmts.emplace_back("webrtc-datachannel");