Index: media/base/audio_block_fifo.cc |
diff --git a/media/base/audio_block_fifo.cc b/media/base/audio_block_fifo.cc |
index b8cecfa164e6890c5c4c1b2f838860d7da64a953..2916c3a058eb76e5be2b795c01614fadb58aeaa4 100644 |
--- a/media/base/audio_block_fifo.cc |
+++ b/media/base/audio_block_fifo.cc |
@@ -44,7 +44,8 @@ void AudioBlockFifo::Push(const void* source, |
std::min(block_frames_ - write_pos_, frames_to_push); |
// Deinterleave the content to the FIFO and update the |write_pos_|. |
- current_block->FromInterleaved(source_ptr, push_frames, bytes_per_sample); |
+ current_block->FromInterleavedPartial(source_ptr, write_pos_, push_frames, |
DaleCurtis
2014/07/18 18:21:54
Whoops. Is this style clang-format approved?
no longer working on chromium
2014/07/21 15:13:30
Fixed.
|
+ bytes_per_sample); |
write_pos_ = (write_pos_ + push_frames) % block_frames_; |
if (!write_pos_) { |
// The current block is completely filled, increment |write_block_| and |
@@ -55,6 +56,7 @@ void AudioBlockFifo::Push(const void* source, |
source_ptr += push_frames * bytes_per_sample * current_block->channels(); |
frames_to_push -= push_frames; |
+ DCHECK_GE(frames_to_push, 0); |
} |
} |