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

Unified Diff: media/mp4/offset_byte_queue.cc

Issue 10823069: Make peeking before the head of OffsetByteQueue a hard error. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 | media/mp4/offset_byte_queue_unittest.cc » ('j') | media/mp4/offset_byte_queue_unittest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mp4/offset_byte_queue.cc
diff --git a/media/mp4/offset_byte_queue.cc b/media/mp4/offset_byte_queue.cc
index 862d9370b20b58ffdee8f874c5a4ba2b6c574e44..a530150899bce18a9ec56c9c8d03aa361943864e 100644
--- a/media/mp4/offset_byte_queue.cc
+++ b/media/mp4/offset_byte_queue.cc
@@ -37,6 +37,7 @@ void OffsetByteQueue::Pop(int count) {
}
void OffsetByteQueue::PeekAt(int64 offset, const uint8** buf, int* size) {
+ DCHECK(offset >= head());
acolwell GONE FROM CHROMIUM 2012/07/30 20:49:04 Is this a result of a coding error, or can unexpec
strobe_ 2012/07/31 18:34:38 As of now, it can only be the result of a programm
if (offset < head() || offset >= tail()) {
*buf = NULL;
*size = 0;
« no previous file with comments | « no previous file | media/mp4/offset_byte_queue_unittest.cc » ('j') | media/mp4/offset_byte_queue_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698