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

Merge branch '4.0release' into merge/develop

This commit is contained in:
winlin 2021-09-26 17:11:39 +08:00
commit 9194d28d0c
2 changed files with 25 additions and 8 deletions

View file

@ -1715,15 +1715,19 @@ 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;
SrsRtpFUAPayload2* fua_payload = dynamic_cast<SrsRtpFUAPayload2*>(pkt->payload());
if (fua_payload) {
if (fua_payload->start) {
++fu_s_c;
}
if (fua_payload->end) {
++fu_e_c;
}
// fix crash when pkt->payload() if pkt is nullptr;
if (!pkt) continue;
SrsRtpFUAPayload2* fua_payload = dynamic_cast<SrsRtpFUAPayload2*>(pkt->payload());
if (!fua_payload) continue;
if (fua_payload->start) {
++fu_s_c;
}
if (fua_payload->end) {
++fu_e_c;
}
}