优化G711 rtp打包分片逻辑相关代码

This commit is contained in:
xia-chu
2024-11-29 20:19:30 +08:00
parent f5d5b71731
commit 64285b6b09
3 changed files with 35 additions and 38 deletions

View File

@@ -119,7 +119,7 @@ Track::Ptr getTrackBySdpU(const SdpTrack::Ptr &track) {
RtpCodec::Ptr getRtpEncoderByCodecId_l(CodecId codec, uint8_t pt) {
if (pt == Rtsp::PT_PCMA || pt == Rtsp::PT_PCMU) {
return std::make_shared<G711RtpEncoder>(codec, 1);
return std::make_shared<G711RtpEncoder>(8000, 1);
}
return std::make_shared<CommonRtpEncoder>();
}