Compare commits

...

2 Commits

Author SHA1 Message Date
Lidaofu
be6f6a6690
fix: 修复c sdk 信令服务及ice服务未关闭问题 (#4475)
Some checks are pending
Android / build (push) Waiting to run
CodeQL / Analyze (cpp) (push) Waiting to run
CodeQL / Analyze (javascript) (push) Waiting to run
Docker / build (push) Waiting to run
Linux / build (push) Waiting to run
macOS / build (push) Waiting to run
Windows / build (push) Waiting to run
2025-09-26 17:51:33 +08:00
xia-chu
1bb3b43313 兼容某些不规范的rtsp流 (#4463)
兼容某些rtsp流sdp中的vps/sps/pps信息没有去除start code的问题
2025-09-26 15:27:28 +08:00
3 changed files with 8 additions and 2 deletions

View File

@ -82,6 +82,9 @@ API_EXPORT void API_CALL mk_stop_all_server(){
#ifdef ENABLE_WEBRTC
rtcServer_udp = nullptr;
rtcServer_tcp = nullptr;
iceServer_udp = nullptr;
iceServer_tcp = nullptr;
CLEAR_ARR(signaling_server);
#endif
#ifdef ENABLE_SRT
srtServer = nullptr;

View File

@ -391,7 +391,7 @@ Track::Ptr getTrackBySdp(const SdpTrack::Ptr &track) {
// If there is no sps/pps in the sdp, then it may be possible to recover the sps/pps in the subsequent rtp
return std::make_shared<H264Track>();
}
return std::make_shared<H264Track>(sps, pps, 0, 0);
return std::make_shared<H264Track>(sps, pps, prefixSize(sps.data(), sps.size()), prefixSize(pps.data(), pps.size()));
}
RtpCodec::Ptr getRtpEncoderByCodecId(uint8_t pt) {

View File

@ -392,7 +392,10 @@ Track::Ptr getTrackBySdp(const SdpTrack::Ptr &track) {
// If there is no sps/pps in the sdp, then it may be possible to recover sps/pps from the subsequent rtp
return std::make_shared<H265Track>();
}
return std::make_shared<H265Track>(vps, sps, pps, 0, 0, 0);
return std::make_shared<H265Track>(vps, sps, pps,
prefixSize(vps.data(), vps.size()),
prefixSize(sps.data(), sps.size()),
prefixSize(pps.data(), pps.size()));
}
RtpCodec::Ptr getRtpEncoderByCodecId(uint8_t pt) {