Index: webkit/glue/webmediaplayer_impl.cc |
diff --git a/webkit/glue/webmediaplayer_impl.cc b/webkit/glue/webmediaplayer_impl.cc |
index b30e013ba45e4076b05352f11bece97748310659..789f12a0d8aa544b6761c9b612c4d47a2891fea3 100644 |
--- a/webkit/glue/webmediaplayer_impl.cc |
+++ b/webkit/glue/webmediaplayer_impl.cc |
@@ -99,6 +99,7 @@ WebMediaPlayerImpl::WebMediaPlayerImpl( |
paused_(true), |
seeking_(false), |
playback_rate_(0.0f), |
+ pending_seek_(false), |
client_(client), |
proxy_(NULL), |
media_stream_client_(media_stream_client), |
@@ -295,6 +296,12 @@ void WebMediaPlayerImpl::seek(float seconds) { |
return; |
} |
+ if (seeking_) { |
+ pending_seek_ = true; |
+ pending_seek_seconds_ = seconds; |
+ return; |
+ } |
+ |
media_log_->AddEvent(media_log_->CreateSeekEvent(seconds)); |
base::TimeDelta seek_time = ConvertSecondsToTimestamp(seconds); |
@@ -701,9 +708,14 @@ void WebMediaPlayerImpl::OnPipelineSeek(PipelineStatus status) { |
} |
SetReadyState(WebKit::WebMediaPlayer::HaveEnoughData); |
- seeking_ = false; |
GetClient()->timeChanged(); |
} |
+ seeking_ = false; |
Ami GONE FROM CHROMIUM
2011/09/13 20:12:58
Curious about the reason for this move.
SeRya
2011/09/13 22:14:21
Player should leave "seeking" state whether seek s
|
+ |
+ if (pending_seek_) { |
+ pending_seek_ = false; |
+ seek(pending_seek_seconds_); |
+ } |
} |
void WebMediaPlayerImpl::OnPipelineEnded(PipelineStatus status) { |