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

Unified Diff: media/base/audio_decoder_config.cc

Issue 2752323002: Support Opus Ambisonics playback (Closed)
Patch Set: +pipeline integration tests, +test media, minor fixes 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 225f19a7f796c34c42c31e2dfcf78dd11f8181d5..5fabc1083344a5e02427c9c5c8df6229a13ce109 100644
--- a/media/base/audio_decoder_config.cc
+++ b/media/base/audio_decoder_config.cc
@@ -51,8 +51,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 SetChannelsForDiscrete()
+ channels_ = ChannelLayoutToChannelCount(channel_layout_);
+ bytes_per_frame_ = channels_ * bytes_per_channel_;
}
AudioDecoderConfig::~AudioDecoderConfig() {}

Powered by Google App Engine
This is Rietveld 408576698