diff options
Diffstat (limited to 'webkit/glue/webmediaplayer_impl.cc')
-rw-r--r-- | webkit/glue/webmediaplayer_impl.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/webkit/glue/webmediaplayer_impl.cc b/webkit/glue/webmediaplayer_impl.cc index 5df50d4..00c6834 100644 --- a/webkit/glue/webmediaplayer_impl.cc +++ b/webkit/glue/webmediaplayer_impl.cc @@ -262,9 +262,13 @@ bool WebMediaPlayerImpl::supportsSave() const { 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; |