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

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

Issue 805273007: Android: Propagate sample rate change to audio decoder job (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
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 d96785e2121de96e6162c280da8ee3f6ef6dbdbf..a5b0da6f54c77c99b5752d503b8d7ef09d8de6a5 100644
--- a/media/base/android/media_decoder_job.cc
+++ b/media/base/android/media_decoder_job.cc
@@ -445,7 +445,7 @@ void MediaDecoderJob::DecodeInternal(
// TODO(xhwang/qinmin): This logic is correct but strange. Clean it up.
if (output_eos_encountered_)
status = MEDIA_CODEC_OUTPUT_END_OF_STREAM;
- else if (has_format_change)
+ else if (has_format_change && UpdateOutputFormat())
gunsch 2015/01/12 16:30:51 What's the reason for moving UpdateOutputFormat up
kjoswiak 2015/01/12 19:44:48 Short story, it crashes without this change. Long
status = MEDIA_CODEC_OUTPUT_FORMAT_CHANGED;
bool render_output = presentation_timestamp >= preroll_timestamp_ &&
@@ -543,8 +543,7 @@ void MediaDecoderJob::OnDecodeCompleted(
}
if (status == MEDIA_CODEC_OUTPUT_FORMAT_CHANGED) {
- if (UpdateOutputFormat())
- config_changed_cb_.Run();
+ config_changed_cb_.Run();
status = MEDIA_CODEC_OK;
}
@@ -649,10 +648,6 @@ bool MediaDecoderJob::IsCodecReconfigureNeeded(
return true;
}
-bool MediaDecoderJob::UpdateOutputFormat() {
- return false;
-}
-
void MediaDecoderJob::ReleaseMediaCodecBridge() {
if (!media_codec_bridge_)
return;
« media/base/android/audio_decoder_job.cc ('K') | « media/base/android/media_decoder_job.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698