Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(668)

Unified Diff: media/base/android/media_decoder_job.cc

Issue 638233002: Preroll decoders when video starts playing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | media/base/android/media_source_player.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/android/media_decoder_job.cc
diff --git a/media/base/android/media_decoder_job.cc b/media/base/android/media_decoder_job.cc
index bceba43bc16f8f72ce6312bfd180078f11cd3b07..ed2216a5f859eaeb9ef5d2325cc5a05312c48a5b 100644
--- a/media/base/android/media_decoder_job.cc
+++ b/media/base/android/media_decoder_job.cc
@@ -116,7 +116,6 @@ bool MediaDecoderJob::Decode(
DCHECK(decode_cb_.is_null());
DCHECK(data_received_cb_.is_null());
DCHECK(ui_task_runner_->BelongsToCurrentThread());
-
if (!media_codec_bridge_ || need_to_reconfig_decoder_job_) {
need_to_reconfig_decoder_job_ = !CreateMediaCodecBridge();
if (drain_decoder_) {
@@ -511,8 +510,10 @@ void MediaDecoderJob::OnDecodeCompleted(
DCHECK(!decode_cb_.is_null());
// If output was queued for rendering, then we have completed prerolling.
- if (current_presentation_timestamp != kNoTimestamp())
+ if (current_presentation_timestamp != kNoTimestamp() ||
+ status == MEDIA_CODEC_OUTPUT_END_OF_STREAM) {
prerolling_ = false;
+ }
switch (status) {
case MEDIA_CODEC_OK:
« no previous file with comments | « no previous file | media/base/android/media_source_player.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698