修复状态紊乱导致访问空指针的bug
Some checks failed
Android / build (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
Docker / build (push) Has been cancelled
Linux / build (push) Has been cancelled
Linux_Python / build (push) Has been cancelled
macOS / build (push) Has been cancelled
macOS_Python / build (push) Has been cancelled
Windows / build (push) Has been cancelled
Windows_Python / build (push) Has been cancelled

有用户反馈崩溃在此处,尝试修复之
This commit is contained in:
xia-chu 2026-03-01 12:11:47 +08:00
parent 725fdf1786
commit 6c82601fe2

View File

@ -114,7 +114,7 @@ void WebRtcPusher::onRecvRtp(MediaTrack &track, const string &rid, RtpPacket::Pt
void WebRtcPusher::onStartWebRTC() {
WebRtcTransportImp::onStartWebRTC();
_simulcast = _answer_sdp->supportSimulcast();
if (canRecvRtp()) {
if (canRecvRtp() && _push_src) {
_push_src->setSdp(_answer_sdp->toRtspSdp());
}
}