Commit 9bf805c1 authored by timav's avatar timav Committed by Commit bot

Set audible status to false if audio is stopped after prefetch.

We discovered an audio playing site that often triggers
the starvation condition during the playback. This introduces
a race between Pause , starvation detecton and the MediaDecoderCallback.
If starvation detection happens between Pause and the callback,
we will do Prefetch and then stop the flow of packets,
and won't update the audible status properly.

This fix sets the audible status to false in OnPrefetchDone()
if we realize that the flow will stop.

BUG=474761

Review URL: https://codereview.chromium.org/1067153002

Cr-Commit-Position: refs/heads/master@{#327336}
parent 72928bb9
...@@ -134,6 +134,8 @@ void MediaSourcePlayer::Pause(bool is_media_related_action) { ...@@ -134,6 +134,8 @@ void MediaSourcePlayer::Pause(bool is_media_related_action) {
// MediaDecoderCallback() is called. // MediaDecoderCallback() is called.
playing_ = false; playing_ = false;
start_time_ticks_ = base::TimeTicks(); start_time_ticks_ = base::TimeTicks();
SetAudible(false);
} }
bool MediaSourcePlayer::IsPlaying() { bool MediaSourcePlayer::IsPlaying() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment