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

Unified Diff: media/filters/chunk_demuxer.cc

Issue 312403002: Fix crashes caused when SourceBuffer.remove() is called starting at the presentation duration. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address CR comments. Created 6 years, 6 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 | media/filters/chunk_demuxer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/chunk_demuxer.cc
diff --git a/media/filters/chunk_demuxer.cc b/media/filters/chunk_demuxer.cc
index f5ecd91799667b27b14bdf61da6775e8181f003e..3341fcc86bc53bd80d9500c1dca93a32cc807a42 100644
--- a/media/filters/chunk_demuxer.cc
+++ b/media/filters/chunk_demuxer.cc
@@ -1322,6 +1322,16 @@ void ChunkDemuxer::Remove(const std::string& id, TimeDelta start,
DCHECK(!id.empty());
CHECK(IsValidId(id));
+ DCHECK(start >= base::TimeDelta()) << start.InSecondsF();
+ DCHECK(start < end) << "start " << start.InSecondsF()
+ << " end " << end.InSecondsF();
+ DCHECK(duration_ != kNoTimestamp());
+ DCHECK(start <= duration_) << "start " << start.InSecondsF()
+ << " duration " << duration_.InSecondsF();
+
+ if (start == duration_)
+ return;
+
source_state_map_[id]->Remove(start, end, duration_);
}
« no previous file with comments | « no previous file | media/filters/chunk_demuxer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698