Drop VP8 frames in case of duplicates in RtpFrameReferenceFinder.

BUG=webrtc:5514

Review-Url: https://codereview.webrtc.org/2734453002
Cr-Commit-Position: refs/heads/master@{#17090}
This commit is contained in:
philipel
2017-03-07 03:54:05 -08:00
committed by Commit bot
parent 2150ac2a43
commit 57f19cc0cd
2 changed files with 30 additions and 2 deletions

View File

@ -334,8 +334,15 @@ void RtpFrameReferenceFinder::ManageFrameVp8(
return;
}
RTC_DCHECK((AheadOf<uint16_t, kPicIdLength>(frame->picture_id,
layer_info_it->second[layer])));
if (!(AheadOf<uint16_t, kPicIdLength>(frame->picture_id,
layer_info_it->second[layer]))) {
LOG(LS_WARNING) << "Frame with picture id " << frame->picture_id
<< " and packet range [" << frame->first_seq_num() << ", "
<< frame->last_seq_num() << "] already received, "
<< " dropping frame.";
return;
}
++frame->num_references;
frame->references[layer] = layer_info_it->second[layer];
}