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

Unified Diff: webkit/renderer/media/webmediaplayer_impl.cc

Issue 15872004: Disable preroll duration increase on underflow for MediaSource playback. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Address CR comments Created 7 years, 7 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 | « media/tools/player_x11/player_x11.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/renderer/media/webmediaplayer_impl.cc
diff --git a/webkit/renderer/media/webmediaplayer_impl.cc b/webkit/renderer/media/webmediaplayer_impl.cc
index ac99cadb6cccca7fc052de17126e81a16b175fe5..621f5573e2e6622040a1cd318e32c3962522b9d1 100644
--- a/webkit/renderer/media/webmediaplayer_impl.cc
+++ b/webkit/renderer/media/webmediaplayer_impl.cc
@@ -1050,7 +1050,7 @@ void WebMediaPlayerImpl::NotifyDownloading(bool is_downloading) {
void WebMediaPlayerImpl::StartPipeline(WebKit::WebMediaSource* media_source) {
const CommandLine* cmd_line = CommandLine::ForCurrentProcess();
-
+ bool increase_preroll_on_underflow = true;
// Figure out which demuxer to use.
if (!media_source) {
@@ -1076,6 +1076,12 @@ void WebMediaPlayerImpl::StartPipeline(WebKit::WebMediaSource* media_source) {
// Disable GpuVideoDecoder creation until it supports codec config changes.
// TODO(acolwell): Remove this once http://crbug.com/151045 is fixed.
gpu_factories_ = NULL;
+
+ // Disable preroll increases on underflow since the web application has no
+ // way to detect that this is happening and runs the risk of triggering
+ // unwanted garbage collection if it is to aggressive about appending data.
+ // TODO(acolwell): Remove this once http://crbug.com/144683 is fixed.
+ increase_preroll_on_underflow = false;
}
scoped_ptr<media::FilterCollection> filter_collection(
@@ -1102,7 +1108,8 @@ void WebMediaPlayerImpl::StartPipeline(WebKit::WebMediaSource* media_source) {
new media::AudioRendererImpl(media_thread_.message_loop_proxy(),
audio_source_provider_.get(),
audio_decoders.Pass(),
- set_decryptor_ready_cb));
+ set_decryptor_ready_cb,
+ increase_preroll_on_underflow));
filter_collection->SetAudioRenderer(audio_renderer.Pass());
// Create our video decoders and renderer.
« no previous file with comments | « media/tools/player_x11/player_x11.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698