| Index: media/base/android/media_source_player.cc
|
| diff --git a/media/base/android/media_source_player.cc b/media/base/android/media_source_player.cc
|
| index a91e29d95b6fbdd846e0b5945ce165db55334662..800a53234364267865918a657e52123343946afd 100644
|
| --- a/media/base/android/media_source_player.cc
|
| +++ b/media/base/android/media_source_player.cc
|
| @@ -134,8 +134,6 @@ void MediaSourcePlayer::Pause(bool is_media_related_action) {
|
| // MediaDecoderCallback() is called.
|
| playing_ = false;
|
| start_time_ticks_ = base::TimeTicks();
|
| -
|
| - SetAudible(false);
|
| }
|
|
|
| bool MediaSourcePlayer::IsPlaying() {
|
| @@ -188,7 +186,6 @@ void MediaSourcePlayer::Release() {
|
|
|
| decoder_starvation_callback_.Cancel();
|
|
|
| - SetAudible(false);
|
| DetachListener();
|
| }
|
|
|
| @@ -495,18 +492,13 @@ void MediaSourcePlayer::MediaDecoderCallback(
|
| return;
|
| }
|
|
|
| - if (status == MEDIA_CODEC_OUTPUT_END_OF_STREAM) {
|
| - if (is_audio)
|
| - SetAudible(false);
|
| + if (status == MEDIA_CODEC_OUTPUT_END_OF_STREAM)
|
| return;
|
| - }
|
|
|
| if (!playing_) {
|
| if (is_clock_manager)
|
| interpolator_.StopInterpolating();
|
|
|
| - if (is_audio)
|
| - SetAudible(false);
|
| return;
|
| }
|
|
|
| @@ -515,9 +507,6 @@ void MediaSourcePlayer::MediaDecoderCallback(
|
| DVLOG(2) << __FUNCTION__ << ": Key was added during decoding.";
|
| ResumePlaybackAfterKeyAdded();
|
| } else {
|
| - if (is_audio)
|
| - SetAudible(false);
|
| -
|
| is_waiting_for_key_ = true;
|
| manager()->OnWaitingForDecryptionKey(player_id());
|
| }
|
| @@ -537,11 +526,8 @@ void MediaSourcePlayer::MediaDecoderCallback(
|
| // If the status is MEDIA_CODEC_ABORT, stop decoding new data. The player is
|
| // in the middle of a seek or stop event and needs to wait for the IPCs to
|
| // come.
|
| - if (status == MEDIA_CODEC_ABORT) {
|
| - if (is_audio)
|
| - SetAudible(false);
|
| + if (status == MEDIA_CODEC_ABORT)
|
| return;
|
| - }
|
|
|
| if (prerolling_ && IsPrerollFinished(is_audio)) {
|
| if (IsPrerollFinished(!is_audio)) {
|
| @@ -551,13 +537,6 @@ void MediaSourcePlayer::MediaDecoderCallback(
|
| return;
|
| }
|
|
|
| - // We successfully decoded a frame and going to the next one.
|
| - // Set the audible state.
|
| - if (is_audio) {
|
| - bool is_audible = !prerolling_ && audio_decoder_job_->volume() > 0;
|
| - SetAudible(is_audible);
|
| - }
|
| -
|
| if (is_clock_manager) {
|
| // If we have a valid timestamp, start the starvation callback. Otherwise,
|
| // reset the |start_time_ticks_| so that the next frame will not suffer
|
| @@ -670,13 +649,6 @@ bool MediaSourcePlayer::VideoFinished() {
|
| void MediaSourcePlayer::OnDecoderStarved() {
|
| DVLOG(1) << __FUNCTION__;
|
|
|
| - if (HasAudio()) {
|
| - // If the starvation timer fired but there are no encoded frames
|
| - // in the queue we believe the demuxer (i.e. renderer process) froze.
|
| - if (!audio_decoder_job_->HasData())
|
| - SetAudible(false);
|
| - }
|
| -
|
| SetPendingEvent(PREFETCH_REQUEST_EVENT_PENDING);
|
| ProcessPendingEvents();
|
| }
|
|
|