Index: media/blink/webmediaplayer_impl.cc |
diff --git a/media/blink/webmediaplayer_impl.cc b/media/blink/webmediaplayer_impl.cc |
index fb50bc3f5a4e850e9ac4bf8dcd5f19bc5e43cb94..f6b8c9adfacd99d7a06d3edc4e9e44e1614ec8fd 100644 |
--- a/media/blink/webmediaplayer_impl.cc |
+++ b/media/blink/webmediaplayer_impl.cc |
@@ -329,11 +329,16 @@ void WebMediaPlayerImpl::seek(double seconds) { |
media_log_->AddEvent(media_log_->CreateSeekEvent(seconds)); |
// Update our paused time. |
- // In paused state ignore the seek operations to current time if the loading |
- // is completed and generate OnPipelineBufferingStateChanged event to |
- // eventually fire seeking and seeked events |
+ // For non-MSE playbacks, in paused state ignore the seek operations to |
+ // current time if the loading is completed and generate |
+ // OnPipelineBufferingStateChanged event to eventually fire seeking and seeked |
+ // events. We don't short-circuit MSE seeks in this logic because the |
+ // underlying buffers around the seek time might have changed (or even been |
+ // removed) since previous seek/preroll/pause action, and the pipeline might |
+ // need to flush so the new buffers are decoded and rendered instead of the |
+ // old ones. |
if (paused_) { |
- if (paused_time_ != new_seek_time) { |
+ if (paused_time_ != new_seek_time || chunk_demuxer_) { |
paused_time_ = new_seek_time; |
} else if (old_state == ReadyStateHaveEnoughData) { |
main_task_runner_->PostTask( |