Index: content/browser/renderer_host/media/audio_sync_reader.cc |
diff --git a/content/browser/renderer_host/media/audio_sync_reader.cc b/content/browser/renderer_host/media/audio_sync_reader.cc |
index 18ac79d070666078c6e7d97280c1a5650d848e84..a699cb946e8994395ee76c4148690016dd6641ca 100644 |
--- a/content/browser/renderer_host/media/audio_sync_reader.cc |
+++ b/content/browser/renderer_host/media/audio_sync_reader.cc |
@@ -74,6 +74,7 @@ AudioSyncReader::AudioSyncReader( |
reinterpret_cast<AudioOutputBuffer*>(shared_memory_->memory()); |
output_bus_ = AudioBus::WrapMemory(params, buffer->audio); |
output_bus_->Zero(); |
+ output_bus_->set_is_bitstream_format(params.IsBitstreamFormat()); |
} |
AudioSyncReader::~AudioSyncReader() { |
@@ -212,8 +213,15 @@ void AudioSyncReader::Read(AudioBus* dest) { |
if (mute_audio_) |
DaleCurtis
2017/06/15 21:46:31
Just return instead of having else block.
AndyWu
2017/08/02 01:43:38
Done.
|
dest->Zero(); |
- else |
+ else { |
+ if (output_bus_->is_bitstream_format()) { |
+ AudioOutputBuffer* buffer = |
+ reinterpret_cast<AudioOutputBuffer*>(shared_memory_->memory()); |
+ output_bus_->set_frames(buffer->params.frames); |
+ output_bus_->set_data_size(buffer->params.data_size); |
+ } |
output_bus_->CopyTo(dest); |
+ } |
} |
void AudioSyncReader::Close() { |