Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(899)

Unified Diff: media/filters/source_buffer_stream.cc

Issue 2856633002: Adding defensive CHECKs for AudioDecoderConfig crash (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/filters/chunk_demuxer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/source_buffer_stream.cc
diff --git a/media/filters/source_buffer_stream.cc b/media/filters/source_buffer_stream.cc
index 895df15f263c7df9bc11ed918029ab6ec23d4289..be4f1c11461253b895d3f79e89d29ccbf54e5d1a 100644
--- a/media/filters/source_buffer_stream.cc
+++ b/media/filters/source_buffer_stream.cc
@@ -1551,12 +1551,18 @@ bool SourceBufferStream::IsEndOfStreamReached() const {
const AudioDecoderConfig& SourceBufferStream::GetCurrentAudioDecoderConfig() {
if (config_change_pending_)
CompleteConfigChange();
+ // Trying to track down crash. http://crbug.com/715761
+ CHECK(current_config_index_ >= 0 &&
+ static_cast<size_t>(current_config_index_) < audio_configs_.size());
return audio_configs_[current_config_index_];
}
const VideoDecoderConfig& SourceBufferStream::GetCurrentVideoDecoderConfig() {
if (config_change_pending_)
CompleteConfigChange();
+ // Trying to track down crash. http://crbug.com/715761
+ CHECK(current_config_index_ >= 0 &&
+ static_cast<size_t>(current_config_index_) < video_configs_.size());
return video_configs_[current_config_index_];
}
« no previous file with comments | « media/filters/chunk_demuxer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698