mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-27 04:35:34 +08:00
Fix crash caused by invalid iterator access
This commit is contained in:
@@ -173,15 +173,16 @@ bool RtpVideoReceiver::CheckIsFrameCompleted(RtpPacket& rtp_packet) {
|
|||||||
|
|
||||||
while (end_seq--) {
|
while (end_seq--) {
|
||||||
auto it = incomplete_frame_list_.find(end_seq);
|
auto it = incomplete_frame_list_.find(end_seq);
|
||||||
complete_frame_size += it->second.PayloadSize();
|
|
||||||
if (it == incomplete_frame_list_.end()) {
|
if (it == incomplete_frame_list_.end()) {
|
||||||
// The last fragment has already received. If all fragments are in
|
// The last fragment has already received. If all fragments are in
|
||||||
// order, then some fragments lost in tranmission and need to be
|
// order, then some fragments lost in tranmission and need to be
|
||||||
// repaired using FEC
|
// repaired using FEC
|
||||||
return false;
|
return false;
|
||||||
} else if (!it->second.FuAStart()) {
|
} else if (!it->second.FuAStart()) {
|
||||||
|
complete_frame_size += it->second.PayloadSize();
|
||||||
continue;
|
continue;
|
||||||
} else if (it->second.FuAStart()) {
|
} else if (it->second.FuAStart()) {
|
||||||
|
complete_frame_size += it->second.PayloadSize();
|
||||||
if (!nv12_data_) {
|
if (!nv12_data_) {
|
||||||
nv12_data_ = new uint8_t[NV12_BUFFER_SIZE];
|
nv12_data_ = new uint8_t[NV12_BUFFER_SIZE];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user