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

Unified Diff: media/filters/source_buffer_stream.cc

Issue 51983002: Update selected range after truncation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments Created 7 years, 1 month 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 03de160b557314c2a27949745233728292dcc47c..c97d983a1f5f052fd98fedcce923f782b8d36d1e 100644
--- a/media/filters/source_buffer_stream.cc
+++ b/media/filters/source_buffer_stream.cc
@@ -1054,6 +1054,8 @@ void SourceBufferStream::OnSetDuration(base::TimeDelta duration) {
// Need to partially truncate this range.
if ((*itr)->GetStartTimestamp() < duration) {
(*itr)->TruncateAt(duration, NULL, false);
+ if ((*itr == selected_range_) && !selected_range_->HasNextBufferPosition())
+ SetSelectedRange(NULL);
++itr;
}
« 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