Chromium Code Reviews| Index: content/renderer/media/buffered_data_source.cc |
| diff --git a/content/renderer/media/buffered_data_source.cc b/content/renderer/media/buffered_data_source.cc |
| index d0461785f5e5b6e9b79eccee19f4e752da684b31..ff96355c799983a255270036f134aa8e810ab29c 100644 |
| --- a/content/renderer/media/buffered_data_source.cc |
| +++ b/content/renderer/media/buffered_data_source.cc |
| @@ -517,7 +517,7 @@ void BufferedDataSource::UpdateDeferStrategy(bool paused) { |
| // 200 responses end up not being reused to satisfy future range requests, |
| // and we don't want to get too far ahead of the read-head (and thus require |
| // a restart), so keep to the thresholds. |
| - if (!loader_->range_supported()) { |
| + if (!loader_->range_supported() && !assume_fully_buffered_) { |
|
amogh.bihani
2014/05/29 09:38:57
in buffered_resource_loader 'range_supported_' is
|
| loader_->UpdateDeferStrategy(BufferedResourceLoader::kCapacityDefer); |
| return; |
| } |
| @@ -525,8 +525,13 @@ void BufferedDataSource::UpdateDeferStrategy(bool paused) { |
| // If the playback has started (at which point the preload value is ignored) |
| // and we're paused, then try to load as much as possible (the loader will |
| // fall back to kCapacityDefer if it knows the current response won't be |
| - // useful from the cache in the future). |
| + // useful from the cache in the future) for external resources. Loading data |
| + // for local resources is not necessary while the player is paused. |
| if (media_has_played_ && paused) { |
| + if (assume_fully_buffered_) { |
| + loader_->UpdateDeferStrategy(BufferedResourceLoader::kReadThenDefer); |
|
scherkus (not reviewing)
2014/05/30 20:37:39
I feel like kCapacityDefer is right one to use for
amogh.bihani
2014/06/02 05:01:28
Done.
|
| + return; |
| + } |
| loader_->UpdateDeferStrategy(BufferedResourceLoader::kNeverDefer); |
| return; |
| } |