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

Unified Diff: media/base/decoder_buffer.h

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 | « no previous file | media/base/stream_parser_buffer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/decoder_buffer.h
diff --git a/media/base/decoder_buffer.h b/media/base/decoder_buffer.h
index 27de88f4692e3d408d81508bc913c561c2712dc7..c17aa213ab121c24a0abec1214a7e7d9a55ae8f4 100644
--- a/media/base/decoder_buffer.h
+++ b/media/base/decoder_buffer.h
@@ -14,6 +14,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/time/time.h"
#include "build/build_config.h"
+#include "media/base/buffers.h"
#include "media/base/decrypt_config.h"
#include "media/base/media_export.h"
@@ -77,6 +78,9 @@ class MEDIA_EXPORT DecoderBuffer
void set_duration(base::TimeDelta duration) {
DCHECK(!end_of_stream());
+ DCHECK(duration == kNoTimestamp() ||
+ (duration >= base::TimeDelta() && duration != kInfiniteDuration()))
+ << duration.InSecondsF();
duration_ = duration;
}
« no previous file with comments | « no previous file | media/base/stream_parser_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698