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

Unified Diff: media/filters/ffmpeg_demuxer.cc

Issue 2736643003: Remove FFmpegDemuxer DCHECKs that are handled via conditionals. (Closed)
Patch Set: Improve comment. Created 3 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/ffmpeg_demuxer.cc
diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc
index d329492be4808fca7491f6b9fbe49c523f48f805..eca3d78dd419f2d85eca3939267efb081ba7a19b 100644
--- a/media/filters/ffmpeg_demuxer.cc
+++ b/media/filters/ffmpeg_demuxer.cc
@@ -1753,11 +1753,8 @@ void FFmpegDemuxer::OnReadFrameDone(ScopedAVPacket packet, int result) {
return;
}
- // Queue the packet with the appropriate stream.
- DCHECK_GE(packet->stream_index, 0);
- DCHECK_LT(packet->stream_index, static_cast<int>(streams_.size()));
-
- // Defend against ffmpeg giving us a bad stream index.
+ // Queue the packet with the appropriate stream; we must defend against ffmpeg
+ // giving us a bad stream index. See http://crbug.com/698549 for example.
if (packet->stream_index >= 0 &&
packet->stream_index < static_cast<int>(streams_.size()) &&
streams_[packet->stream_index]) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698