Reject re-inserting already decoded frames into FrameBuffer2.

BUG=webrtc:7518

Review-Url: https://codereview.webrtc.org/2842133002
Cr-Commit-Position: refs/heads/master@{#17925}
This commit is contained in:
philipel
2017-04-28 03:29:15 -07:00
committed by Commit bot
parent 56c78aea5f
commit f684269541
2 changed files with 7 additions and 1 deletions

View File

@ -237,7 +237,7 @@ int FrameBuffer::InsertFrame(std::unique_ptr<FrameObject> frame) {
}
if (last_decoded_frame_it_ != frames_.end() &&
key < last_decoded_frame_it_->first) {
key <= last_decoded_frame_it_->first) {
if (AheadOf(frame->timestamp, last_decoded_frame_timestamp_) &&
frame->num_references == 0) {
// If this frame has a newer timestamp but an earlier picture id then we