diff options
author | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-18 00:25:55 +0000 |
---|---|---|
committer | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-18 00:25:55 +0000 |
commit | 2a6c2569d9b128e7fbe2145802f0d800244ad56c (patch) | |
tree | 71e38c7d58792152a12d6f792a5ad1d09c974824 /webkit/glue/webmediaplayer_impl.cc | |
parent | 94f4f5fbea1ab77af1c3e6866a1473f0f7f9d2d1 (diff) | |
download | chromium_src-2a6c2569d9b128e7fbe2145802f0d800244ad56c.zip chromium_src-2a6c2569d9b128e7fbe2145802f0d800244ad56c.tar.gz chromium_src-2a6c2569d9b128e7fbe2145802f0d800244ad56c.tar.bz2 |
Video plays on server without range request
BUG=19521
TEST=Go to http://htmlfive.appspot.com/static/video.html and it will play.
r23255 introduced a regression that causes an extra seek in the
beginning of playing a video file. This extra seek causes FFmpeg
to look for index at the end of file which issue a range request
at the end of the file.
Review URL: http://codereview.chromium.org/171084
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23598 0039d316-1c4b-4281-b951-d872f2087c98
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; |