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

Unified Diff: media/filters/source_buffer_stream.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: 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/source_buffer_stream_unittest.cc » ('j') | 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 7c66f28f059c37894477984355f38513fb875e9d..c177bab5db348ddf80dd84d39fe3289fafecc592 100644
--- a/media/filters/source_buffer_stream.cc
+++ b/media/filters/source_buffer_stream.cc
@@ -589,6 +589,8 @@ void SourceBufferStream::Remove(base::TimeDelta start, base::TimeDelta end,
DCHECK(start < end) << "start " << start.InSecondsF()
<< " end " << end.InSecondsF();
DCHECK(duration != kNoTimestamp());
+ DCHECK(start <= duration) << "start " << start.InSecondsF()
+ << " duration " << duration.InSecondsF();
base::TimeDelta remove_end_timestamp = duration;
base::TimeDelta keyframe_timestamp = FindKeyframeAfterTimestamp(end);
@@ -598,6 +600,9 @@ void SourceBufferStream::Remove(base::TimeDelta start, base::TimeDelta end,
remove_end_timestamp = end;
}
+ if (start == remove_end_timestamp)
wolenetz 2014/06/05 21:38:03 remove_end_timestamp is either duration (in which
acolwell GONE FROM CHROMIUM 2014/06/05 22:56:25 I moved this to ChunkDemuxer::Remove(). I can't go
+ return;
+
BufferQueue deleted_buffers;
RemoveInternal(start, remove_end_timestamp, false, &deleted_buffers);
« no previous file with comments | « no previous file | media/filters/source_buffer_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698