Commit 35a199f1 authored by xhwang's avatar xhwang Committed by Commit bot

MediaSourcePlayer: Only StopInterpolating() when it's interpolating.

BUG=417399

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

Cr-Commit-Position: refs/heads/master@{#296844}
parent 4a414030
...@@ -483,8 +483,11 @@ void MediaSourcePlayer::MediaDecoderCallback( ...@@ -483,8 +483,11 @@ void MediaSourcePlayer::MediaDecoderCallback(
max_presentation_timestamp); max_presentation_timestamp);
} }
if (status == MEDIA_CODEC_OUTPUT_END_OF_STREAM) if (status == MEDIA_CODEC_OUTPUT_END_OF_STREAM) {
PlaybackCompleted(is_audio); PlaybackCompleted(is_audio);
if (is_clock_manager)
interpolator_.StopInterpolating();
}
if (pending_event_ != NO_EVENT_PENDING) { if (pending_event_ != NO_EVENT_PENDING) {
ProcessPendingEvents(); ProcessPendingEvents();
...@@ -592,7 +595,6 @@ void MediaSourcePlayer::PlaybackCompleted(bool is_audio) { ...@@ -592,7 +595,6 @@ void MediaSourcePlayer::PlaybackCompleted(bool is_audio) {
if (AudioFinished() && VideoFinished()) { if (AudioFinished() && VideoFinished()) {
playing_ = false; playing_ = false;
interpolator_.StopInterpolating();
start_time_ticks_ = base::TimeTicks(); start_time_ticks_ = base::TimeTicks();
manager()->OnPlaybackComplete(player_id()); manager()->OnPlaybackComplete(player_id());
} }
......
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