Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1097)

Unified Diff: webrtc/modules/video_coding/rtp_frame_reference_finder.cc

Issue 2392313002: Drop VP8 frames older than the last sync frame in the RtpFrameReferenceFinder. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/modules/video_coding/rtp_frame_reference_finder_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/video_coding/rtp_frame_reference_finder.cc
diff --git a/webrtc/modules/video_coding/rtp_frame_reference_finder.cc b/webrtc/modules/video_coding/rtp_frame_reference_finder.cc
index d687a99924b892bb6b9234c738ac7cfc91376ff7..2213af315568b703645cf8fe979b916770ee9e86 100644
--- a/webrtc/modules/video_coding/rtp_frame_reference_finder.cc
+++ b/webrtc/modules/video_coding/rtp_frame_reference_finder.cc
@@ -298,6 +298,13 @@ void RtpFrameReferenceFinder::ManageFrameVp8(
return;
}
+ // If the last frame on this layer is ahead of this frame it means that
+ // a layer sync frame has been received after this frame for the same
+ // base layer frame, drop this frame.
stefan-webrtc 2016/10/05 14:05:58 Is this always true though? What if we received a
philipel 2016/10/05 14:47:42 I can't find a case where this it not true, rememb
+ if (AheadOf<uint16_t, kPicIdLength>(layer_info_it->second[layer],
+ frame->picture_id))
stefan-webrtc 2016/10/05 14:05:58 {}
philipel 2016/10/05 14:47:42 Done.
+ return;
+
// If we have not yet received a frame between this frame and the referenced
// frame then we have to wait for that frame to be completed first.
auto not_received_frame_it =
@@ -309,6 +316,7 @@ void RtpFrameReferenceFinder::ManageFrameVp8(
return;
}
+ RTC_DCHECK(AheadOf(frame->picture_id, layer_info_it->second[layer]));
++frame->num_references;
frame->references[layer] = layer_info_it->second[layer];
}
« no previous file with comments | « no previous file | webrtc/modules/video_coding/rtp_frame_reference_finder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698