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

Unified Diff: media/blink/multibuffer_data_source.cc

Issue 1869203003: Fix memory usage bug. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/blink/multibuffer_data_source.cc
diff --git a/media/blink/multibuffer_data_source.cc b/media/blink/multibuffer_data_source.cc
index ae27022839b1654c409bb0c3ef9585b90de37e12..d86637d474349ac2da9195c431d14b6e81b35f63 100644
--- a/media/blink/multibuffer_data_source.cc
+++ b/media/blink/multibuffer_data_source.cc
@@ -570,8 +570,8 @@ void MultibufferDataSource::UpdateBufferSizes() {
int64_t back_buffer = clamp(kTargetSecondsBufferedBehind * bytes_per_second,
kMinBufferPreload, kMaxBufferPreload);
int64_t pin_forwards = kMaxBufferSize - back_buffer;
- DCHECK_LE(preload_ + kPreloadHighExtra, pin_forwards);
- reader_->SetMaxBuffer(back_buffer, pin_forwards);
+ DCHECK_LE(preload + kPreloadHighExtra, pin_forwards);
+ reader_->SetMaxBuffer(back_buffer, preload + kPreloadHighExtra);
if (preload_ == METADATA) {
reader_->SetPreload(0, 0);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698