diff options
author | hubbe <hubbe@chromium.org> | 2016-03-16 18:14:23 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-17 01:15:31 +0000 |
commit | 5a2dec021242f84d0ec662e272bb1e15bdb2cf25 (patch) | |
tree | 8cdbf23062977cd16984532fc72d4af9ed712986 /media | |
parent | 6144890b6e847d144ca7b719c30e25c7804e45a7 (diff) | |
download | chromium_src-5a2dec021242f84d0ec662e272bb1e15bdb2cf25.zip chromium_src-5a2dec021242f84d0ec662e272bb1e15bdb2cf25.tar.gz chromium_src-5a2dec021242f84d0ec662e272bb1e15bdb2cf25.tar.bz2 |
Speculative crash fix for media::RendererImpl::GetMediaTime
It seems that when the SeekDone comes from the remote side, we crash if there is no pipeline.
When we're remoting, we should probably get the pause_time_ from the remote side, so let's
avoid the crash by doing that.
BUG=586225
Review URL: https://codereview.chromium.org/1807053002
Cr-Commit-Position: refs/heads/master@{#381624}
Diffstat (limited to 'media')
-rw-r--r-- | media/blink/webmediaplayer_impl.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/media/blink/webmediaplayer_impl.cc b/media/blink/webmediaplayer_impl.cc index 6803071..8d58384 100644 --- a/media/blink/webmediaplayer_impl.cc +++ b/media/blink/webmediaplayer_impl.cc @@ -865,8 +865,17 @@ void WebMediaPlayerImpl::OnCdmAttached(bool success) { void WebMediaPlayerImpl::OnPipelineSeeked(bool time_updated) { seeking_ = false; seek_time_ = base::TimeDelta(); - if (paused_) + if (paused_) { +#if defined(OS_ANDROID) // WMPI_CAST + if (isRemote()) { + paused_time_ = base::TimeDelta::FromSecondsD(cast_impl_.currentTime()); + } else { + paused_time_ = pipeline_.GetMediaTime(); + } +#else paused_time_ = pipeline_.GetMediaTime(); +#endif + } if (time_updated) should_notify_time_changed_ = true; } |