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

Unified Diff: media/base/audio_decoder_config.cc

Issue 2752323002: Support Opus Ambisonics playback (Closed)
Patch Set: +tests Created 3 years, 9 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/audio_decoder_config.cc
diff --git a/media/base/audio_decoder_config.cc b/media/base/audio_decoder_config.cc
index 253c82b147c96b0304ce49d83ec7c4334bb78fdb..53b7be6e62174ebbcb6af31d1c5d27a502c0ffb0 100644
--- a/media/base/audio_decoder_config.cc
+++ b/media/base/audio_decoder_config.cc
@@ -50,8 +50,10 @@ void AudioDecoderConfig::Initialize(AudioCodec codec,
seek_preroll_ = seek_preroll;
codec_delay_ = codec_delay;
- int channels = ChannelLayoutToChannelCount(channel_layout_);
- bytes_per_frame_ = channels * bytes_per_channel_;
+ // If |channel_layout_| is CHANNEL_LAYOUT_DISCRETE, |channels_| and
+ // |bytes_per_frame_| will be overwritten in set_channels_for_discrete()
+ channels_ = ChannelLayoutToChannelCount(channel_layout_);
+ bytes_per_frame_ = channels_ * bytes_per_channel_;
}
AudioDecoderConfig::~AudioDecoderConfig() {}

Powered by Google App Engine
This is Rietveld 408576698