diff options
-rw-r--r-- | content/renderer/media/android/audio_decoder_android.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/content/renderer/media/android/audio_decoder_android.cc b/content/renderer/media/android/audio_decoder_android.cc index 73a9225..6373ccd 100644 --- a/content/renderer/media/android/audio_decoder_android.cc +++ b/content/renderer/media/android/audio_decoder_android.cc @@ -481,6 +481,9 @@ static void BufferAndCopyPcmDataToBus(int input_fd, file_sample_rate); for (size_t m = 0; m < number_of_samples; m += number_of_channels) { + if (decoded_frames >= number_of_frames) + break; + for (size_t k = 0; k < number_of_channels; ++k) { int16_t sample = decoded_samples[m + k]; destination_bus->channelData(k)[decoded_frames] = |