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

Side by Side Diff: media/blink/multibuffer_data_source.cc

Issue 2449103008: Remove redundant and erroneous DCHECK (Closed)
Patch Set: Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/blink/multibuffer_data_source.h" 5 #include "media/blink/multibuffer_data_source.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 // If init_cb is set, we initialization is not finished yet. 259 // If init_cb is set, we initialization is not finished yet.
260 if (!init_cb_.is_null()) 260 if (!init_cb_.is_null())
261 return false; 261 return false;
262 if (failed_) 262 if (failed_)
263 return false; 263 return false;
264 return true; 264 return true;
265 } 265 }
266 266
267 void MultibufferDataSource::MediaPlaybackRateChanged(double playback_rate) { 267 void MultibufferDataSource::MediaPlaybackRateChanged(double playback_rate) {
268 DCHECK(render_task_runner_->BelongsToCurrentThread()); 268 DCHECK(render_task_runner_->BelongsToCurrentThread());
269 DCHECK(reader_.get());
270 269
271 if (playback_rate < 0.0) 270 if (playback_rate < 0.0)
272 return; 271 return;
273 272
274 playback_rate_ = playback_rate; 273 playback_rate_ = playback_rate;
275 cancel_on_defer_ = false; 274 cancel_on_defer_ = false;
276 UpdateBufferSizes(); 275 UpdateBufferSizes();
277 } 276 }
278 277
279 void MultibufferDataSource::MediaIsPlaying() { 278 void MultibufferDataSource::MediaIsPlaying() {
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 reader_->SetPinRange(back_buffer, kMaxBufferPreload + kPreloadHighExtra); 614 reader_->SetPinRange(back_buffer, kMaxBufferPreload + kPreloadHighExtra);
616 615
617 if (preload_ == METADATA) { 616 if (preload_ == METADATA) {
618 reader_->SetPreload(0, 0); 617 reader_->SetPreload(0, 0);
619 } else { 618 } else {
620 reader_->SetPreload(preload_high, preload); 619 reader_->SetPreload(preload_high, preload);
621 } 620 }
622 } 621 }
623 622
624 } // namespace media 623 } // namespace media
OLDNEW
« 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