| Index: media/formats/webm/webm_audio_client.cc
|
| diff --git a/media/formats/webm/webm_audio_client.cc b/media/formats/webm/webm_audio_client.cc
|
| index e0d382c256b12707aafd0b8a78c1679a16c72d81..92bb40f0ace1be47ed4d346c628e41c4d5702cb7 100644
|
| --- a/media/formats/webm/webm_audio_client.cc
|
| +++ b/media/formats/webm/webm_audio_client.cc
|
| @@ -29,6 +29,7 @@ bool WebMAudioClient::InitializeConfig(
|
| int64 seek_preroll, int64 codec_delay, bool is_encrypted,
|
| AudioDecoderConfig* config) {
|
| DCHECK(config);
|
| + SampleFormat sample_format = kSampleFormatPlanarF32;
|
|
|
| AudioCodec audio_codec = kUnknownAudioCodec;
|
| if (codec_id == "A_VORBIS") {
|
| @@ -60,8 +61,10 @@ bool WebMAudioClient::InitializeConfig(
|
|
|
| // Always use 48kHz for OPUS. See the "Input Sample Rate" section of the
|
| // spec: http://tools.ietf.org/html/draft-terriberry-oggopus-01#page-11
|
| - if (audio_codec == kCodecOpus)
|
| + if (audio_codec == kCodecOpus) {
|
| samples_per_second = 48000;
|
| + sample_format = kSampleFormatF32;
|
| + }
|
|
|
| const uint8* extra_data = NULL;
|
| size_t extra_data_size = 0;
|
| @@ -81,7 +84,7 @@ bool WebMAudioClient::InitializeConfig(
|
|
|
| config->Initialize(
|
| audio_codec,
|
| - (audio_codec == kCodecOpus) ? kSampleFormatS16 : kSampleFormatPlanarF32,
|
| + sample_format,
|
| channel_layout,
|
| samples_per_second,
|
| extra_data,
|
|
|