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

Unified Diff: media/filters/source_buffer_stream.cc

Issue 379693002: Update SourceBufferStream and its unit tests to always expect valid durations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address CR comment Created 6 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 | « media/base/stream_parser_buffer.cc ('k') | 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 f72b00aea14f2ba056ecbe28f166cada628a3620..8bc65854c0d2331b5b5ba39af9768a73540d487c 100644
--- a/media/filters/source_buffer_stream.cc
+++ b/media/filters/source_buffer_stream.cc
@@ -717,6 +717,11 @@ bool SourceBufferStream::IsMonotonicallyIncreasing(
base::TimeDelta current_timestamp = (*itr)->GetDecodeTimestamp();
bool current_is_keyframe = (*itr)->IsKeyframe();
DCHECK(current_timestamp != kNoTimestamp());
+ DCHECK((*itr)->duration() >= base::TimeDelta())
+ << "Packet with invalid duration."
+ << " pts " << (*itr)->timestamp().InSecondsF()
+ << " dts " << (*itr)->GetDecodeTimestamp().InSecondsF()
+ << " dur " << (*itr)->duration().InSecondsF();
if (prev_timestamp != kNoTimestamp()) {
if (current_timestamp < prev_timestamp) {
« no previous file with comments | « media/base/stream_parser_buffer.cc ('k') | media/filters/source_buffer_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698