summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
Diffstat (limited to 'media')
-rw-r--r--media/filters/opus_audio_decoder.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/media/filters/opus_audio_decoder.cc b/media/filters/opus_audio_decoder.cc
index 5c6eca8..4a56033 100644
--- a/media/filters/opus_audio_decoder.cc
+++ b/media/filters/opus_audio_decoder.cc
@@ -227,7 +227,8 @@ static void ParseOpusHeader(const uint8* data, int data_size,
}
CHECK_GE(data_size, kOpusHeaderStreamMapOffset + header->channels)
- << "Invalid stream map.";
+ << "Invalid stream map; insufficient data for current channel count: "
+ << header->channels;
header->num_streams = *(data + kOpusHeaderNumStreamsOffset);
header->num_coupled = *(data + kOpusHeaderNumCoupledOffset);
@@ -235,7 +236,7 @@ static void ParseOpusHeader(const uint8* data, int data_size,
if (header->num_streams + header->num_coupled != header->channels)
LOG(WARNING) << "Inconsistent channel mapping.";
- for (int i = 0; i < kMaxVorbisChannels; ++i)
+ for (int i = 0; i < header->channels; ++i)
header->stream_map[i] = *(data + kOpusHeaderStreamMapOffset + i);
}