Index: media/base/audio_block_fifo.cc |
diff --git a/media/base/audio_block_fifo.cc b/media/base/audio_block_fifo.cc |
index be15fb11638729c914ba9293e092c9d5b0e140c7..411fa6078de578ddf83c8df4440585c4a27d839e 100644 |
--- a/media/base/audio_block_fifo.cc |
+++ b/media/base/audio_block_fifo.cc |
@@ -36,7 +36,7 @@ void AudioBlockFifo::PushSilence(int frames) { |
const AudioBus* AudioBlockFifo::Consume() { |
DCHECK(available_blocks_); |
- AudioBus* audio_bus = audio_blocks_[read_block_]; |
+ AudioBus* audio_bus = audio_blocks_[read_block_].get(); |
read_block_ = (read_block_ + 1) % audio_blocks_.size(); |
--available_blocks_; |
return audio_bus; |
@@ -67,10 +67,8 @@ void AudioBlockFifo::IncreaseCapacity(int blocks) { |
audio_blocks_.reserve(audio_blocks_.size() + blocks); |
const int original_size = audio_blocks_.size(); |
- for (int i = 0; i < blocks; ++i) { |
- audio_blocks_.push_back( |
- AudioBus::Create(channels_, block_frames_).release()); |
- } |
+ for (int i = 0; i < blocks; ++i) |
+ audio_blocks_.push_back(AudioBus::Create(channels_, block_frames_)); |
if (!original_size) |
return; |
@@ -103,7 +101,7 @@ void AudioBlockFifo::PushInternal(const void* source, |
int frames_to_push = frames; |
while (frames_to_push) { |
// Get the current write block. |
- AudioBus* current_block = audio_blocks_[write_block_]; |
+ AudioBus* current_block = audio_blocks_[write_block_].get(); |
// Figure out what segment sizes we need when adding the new content to |
// the FIFO. |