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

Unified Diff: media/filters/source_buffer_stream.cc

Issue 10703125: Fix SplitRange() logic in SourceBufferRange to transfer next buffer position appropriately (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 1d295d43dfa2b418285864c31dac5f94a9270d5f..141321fa6270d079744933b3689435badc59bee5 100644
--- a/media/filters/source_buffer_stream.cc
+++ b/media/filters/source_buffer_stream.cc
@@ -822,12 +822,17 @@ SourceBufferRange* SourceBufferRange::SplitRange(base::TimeDelta timestamp) {
new SourceBufferRange(
removed_buffers, kNoTimestamp(), interbuffer_distance_cb_);
- // If |next_buffer_index_| points to a buffer in |split_range|, update the
- // |next_buffer_index_| of this range and |split_range| accordingly.
+ // If the next buffer position is now in |split_range|, update the state of
+ // this range and |split_range| accordingly.
if (next_buffer_index_ >= static_cast<int>(buffers_.size())) {
split_range->next_buffer_index_ = next_buffer_index_ - keyframe_index;
acolwell GONE FROM CHROMIUM 2012/07/10 20:19:32 DCHECK(!waiting_for_keyframe_) ?
vrk (LEFT CHROMIUM) 2012/07/10 20:34:54 Done.
- next_buffer_index_ = -1;
+ ResetNextBufferPosition();
+ } else if (waiting_for_keyframe_) {
+ split_range->waiting_for_keyframe_ = true;
+ split_range->next_keyframe_timestamp_ = next_keyframe_timestamp_;
+ ResetNextBufferPosition();
}
+
return split_range;
}
@@ -882,7 +887,7 @@ bool SourceBufferRange::TruncateAt(
BufferQueue saved(starting_point + next_buffer_offset, buffers_.end());
removed_buffers->swap(saved);
}
- next_buffer_index_ = -1;
+ ResetNextBufferPosition();
removed_next_buffer = true;
}
}
« 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