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

Unified Diff: webrtc/modules/video_coding/frame_buffer2.h

Issue 2937243002: Validate references of frames inserted into FrameBuffer2. (Closed)
Patch Set: . Created 3 years, 6 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
Index: webrtc/modules/video_coding/frame_buffer2.h
diff --git a/webrtc/modules/video_coding/frame_buffer2.h b/webrtc/modules/video_coding/frame_buffer2.h
index 6ce3b4be57f6b865ffdf18aa35357d974b3d2300..5d73fdac33af39b98e9f843583d86f24600f6af6 100644
--- a/webrtc/modules/video_coding/frame_buffer2.h
+++ b/webrtc/modules/video_coding/frame_buffer2.h
@@ -97,6 +97,8 @@ class FrameBuffer {
// Which other frames that have direct unfulfilled dependencies
// on this frame.
+ // TODO(philipel): Add simple modify/access functions to prevent adding to
tommi 2017/06/15 15:42:10 nit: adding too
stefan-webrtc 2017/06/15 15:47:09 too
+ // many |dependent_frames|.
FrameKey dependent_frames[kMaxNumDependentFrames];
size_t num_dependent_frames = 0;
@@ -120,6 +122,9 @@ class FrameBuffer {
using FrameMap = std::map<FrameKey, FrameInfo>;
+ // Check that the references of |frame| are valid.
+ bool ValidReferences(const FrameObject& frame) const;
+
// Updates the minimal and maximal playout delays
// depending on the frame.
void UpdatePlayoutDelays(const FrameObject& frame)
« no previous file with comments | « no previous file | webrtc/modules/video_coding/frame_buffer2.cc » ('j') | webrtc/modules/video_coding/frame_buffer2.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698