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

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

Issue 2042563002: Fix initialization of AudioTrack related output parameters (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/audio_media_codec_decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/android/audio_decoder_job.cc
diff --git a/media/base/android/audio_decoder_job.cc b/media/base/android/audio_decoder_job.cc
index 8c619bee23631083239b7cb5ba016aade1b17ed1..5b892144ed32f122f49941f8892bbeada7108ca0 100644
--- a/media/base/android/audio_decoder_job.cc
+++ b/media/base/android/audio_decoder_job.cc
@@ -186,6 +186,12 @@ MediaDecoderJob::MediaDecoderJobStatus
return STATUS_FAILURE;
}
+ // ConfigureAndStart() creates AudioTrack with |config_sampling_rate_|
+ // and |config_num_channels_|. Keep |output_...| in sync to detect the changes
+ // that might come with OnOutputFormatChanged().
+ output_sampling_rate_ = config_sampling_rate_;
+ output_num_channels_ = config_num_channels_;
+
SetVolumeInternal();
// Reset values used to track codec bridge output
« no previous file with comments | « no previous file | media/base/android/audio_media_codec_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698