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

Unified Diff: webkit/glue/webmediaplayer_impl.cc

Issue 171084: Video plays on server without range request... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 4 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: webkit/glue/webmediaplayer_impl.cc
===================================================================
--- webkit/glue/webmediaplayer_impl.cc (revision 23570)
+++ webkit/glue/webmediaplayer_impl.cc (working copy)
@@ -262,9 +262,13 @@
void WebMediaPlayerImpl::seek(float seconds) {
DCHECK(MessageLoop::current() == main_loop_);
- // TODO(scherkus): WebKit fires a seek(0) at the very start, however pipeline
- // already does a seek(0) internally. Investigate whether doing two seek(0)
- // at the start impacts startup latency.
+ // WebKit fires a seek(0) at the very start, however pipeline already does a
+ // seek(0) internally. Avoid doing seek(0) the second time because this will
+ // cause extra pre-rolling and will break servers without range request
+ // support.
+ if (pipeline_->GetCurrentTime().ToInternalValue() == 0 && seconds == 0) {
+ return;
+ }
// Try to preserve as much accuracy as possible.
float microseconds = seconds * base::Time::kMicrosecondsPerSecond;
« 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