1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

fix some crash in rtc. (#2545)

This commit is contained in:
johzzy 2021-09-26 17:01:53 +08:00 committed by GitHub
parent 149ad80b5d
commit dc778020fc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

View file

@ -1715,6 +1715,10 @@ bool SrsRtmpFromRtcBridger::check_frame_complete(const uint16_t start, const uin
for (uint16_t i = 0; i < cnt; ++i) {
int index = cache_index((start + i));
SrsRtpPacket* pkt = cache_video_pkts_[index].pkt;
if (!pkt) {
// fix crash when pkt->payload() if pkt is nullptr;
continue;
}
SrsRtpFUAPayload2* fua_payload = dynamic_cast<SrsRtpFUAPayload2*>(pkt->payload());
if (fua_payload) {
if (fua_payload->start) {