diff options
author | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-20 23:45:15 +0000 |
---|---|---|
committer | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-20 23:45:15 +0000 |
commit | fd286f25135fdf7c7eff85fee35fdd90d11b88fc (patch) | |
tree | cc9467a3c31614e4d009818876c3b3e528c97257 /webkit | |
parent | 2e5c43ee7dc00cedff2074b66d168556112ec2c9 (diff) | |
download | chromium_src-fd286f25135fdf7c7eff85fee35fdd90d11b88fc.zip chromium_src-fd286f25135fdf7c7eff85fee35fdd90d11b88fc.tar.gz chromium_src-fd286f25135fdf7c7eff85fee35fdd90d11b88fc.tar.bz2 |
Issues with video looping
Some video streams are badly muxed and have video packets
with timestamps greater than the duration. This causes the
logic in the video renderer to sleep forever and never read
the end-of-stream packet and thus the stream is never ended.
This change adjusted the condition on when we should sleep
and handle timestamp greater than duration as a special case.
TEST=video loops
BUG=41579
Review URL: http://codereview.chromium.org/1652011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45124 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/glue/webmediaplayer_impl.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/webkit/glue/webmediaplayer_impl.cc b/webkit/glue/webmediaplayer_impl.cc index 41c76f7..d3ef789 100644 --- a/webkit/glue/webmediaplayer_impl.cc +++ b/webkit/glue/webmediaplayer_impl.cc @@ -418,7 +418,7 @@ bool WebMediaPlayerImpl::seeking() const { float WebMediaPlayerImpl::duration() const { DCHECK(MessageLoop::current() == main_loop_); - return static_cast<float>(pipeline_->GetDuration().InSecondsF()); + return static_cast<float>(pipeline_->GetMediaDuration().InSecondsF()); } float WebMediaPlayerImpl::currentTime() const { @@ -452,7 +452,7 @@ float WebMediaPlayerImpl::maxTimeSeekable() const { // TODO(hclam): We need to update this when we have better caching. if (pipeline_->IsStreaming()) return 0.0f; - return static_cast<float>(pipeline_->GetDuration().InSecondsF()); + return static_cast<float>(pipeline_->GetMediaDuration().InSecondsF()); } unsigned long long WebMediaPlayerImpl::bytesLoaded() const { @@ -572,7 +572,7 @@ void WebMediaPlayerImpl::OnPipelineInitialize() { WebKit::WebTimeRanges new_buffered(static_cast<size_t>(1)); new_buffered[0].start = 0.0f; new_buffered[0].end = - static_cast<float>(pipeline_->GetDuration().InSecondsF()); + static_cast<float>(pipeline_->GetMediaDuration().InSecondsF()); buffered_.swap(new_buffered); // Since we have initialized the pipeline, say we have everything otherwise |