Chromium Code Reviews| 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 53df8d3e6588cb72eae6696c4642d7ee86050a1c..c3755ccd6e00b970d85a704c8f4f85b3dd306f04 100644 |
| --- a/media/base/android/media_source_player.cc |
| +++ b/media/base/android/media_source_player.cc |
| @@ -564,7 +564,7 @@ void MediaSourcePlayer::DecodeMoreAudio() { |
| DCHECK(!audio_decoder_job_->is_decoding()); |
| DCHECK(!AudioFinished()); |
| - if (audio_decoder_job_->Decode( |
| + if (MediaDecoderJob::STATUS_SUCCESS == audio_decoder_job_->Decode( |
|
wolenetz
2015/02/04 21:07:23
nit: here and in DecodeMoreVideo(), use a switch t
qinmin
2015/02/04 23:11:23
Done.
|
| start_time_ticks_, |
| start_presentation_timestamp_, |
| base::Bind(&MediaSourcePlayer::MediaDecoderCallback, weak_this_, true))) { |
| @@ -583,18 +583,19 @@ void MediaSourcePlayer::DecodeMoreVideo() { |
| DCHECK(!video_decoder_job_->is_decoding()); |
| DCHECK(!VideoFinished()); |
| - if (video_decoder_job_->Decode( |
| + MediaDecoderJob::MediaDecoderJobStatus status = video_decoder_job_->Decode( |
| start_time_ticks_, |
| start_presentation_timestamp_, |
| base::Bind(&MediaSourcePlayer::MediaDecoderCallback, weak_this_, |
| - false))) { |
| + false)); |
| + if (status == MediaDecoderJob::STATUS_SUCCESS) { |
| TRACE_EVENT_ASYNC_BEGIN0("media", "MediaSourcePlayer::DecodeMoreVideo", |
| video_decoder_job_.get()); |
| return; |
| } |
| // If the decoder is waiting for iframe, trigger a browser seek. |
| - if (!video_decoder_job_->next_video_data_is_iframe()) { |
| + if (status == MediaDecoderJob::STATUS_KEY_FRAME_REQUIRED) { |
| BrowserSeekToCurrentTime(); |
| return; |
| } |