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

Unified Diff: media/blink/multibuffer_reader.h

Issue 1754893006: Fix multibuffer crashing bug (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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: media/blink/multibuffer_reader.h
diff --git a/media/blink/multibuffer_reader.h b/media/blink/multibuffer_reader.h
index 403c03978ba69e14a8b33316da20479108831c3d..19e90617f76ae4f07101927bef962d6bbdbc09ef 100644
--- a/media/blink/multibuffer_reader.h
+++ b/media/blink/multibuffer_reader.h
@@ -101,6 +101,9 @@ class MEDIA_BLINK_EXPORT MultiBufferReader
return block(byte_pos + (1LL << multibuffer_->block_size_shift()) - 1);
}
+ // Unpin previous range, then pin the new range.
+ void PinRange(MultiBuffer::BlockId begin, MultiBuffer::BlockId end);
+
// Check if wait operation can complete now.
void CheckWait();
@@ -133,6 +136,9 @@ class MEDIA_BLINK_EXPORT MultiBufferReader
int64_t max_buffer_forward_;
int64_t max_buffer_backward_;
+ // Currently pinned range.
+ Interval<MultiBuffer::BlockId> pinned_range_;
+
// Current position in bytes.
int64_t pos_;

Powered by Google App Engine
This is Rietveld 408576698