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

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: 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') | media/base/stream_parser_buffer.cc » ('J')
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..9bb3e93c184bd02b1cc37942e238023b1e530a7f 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,8 @@ class MEDIA_EXPORT DecoderBuffer
void set_duration(base::TimeDelta duration) {
DCHECK(!end_of_stream());
+ DCHECK(duration == kNoTimestamp() || duration >= base::TimeDelta())
+ << duration.InSecondsF();
wolenetz 2014/07/09 22:42:16 nit: disallow kInfiniteDuration() buffer duration?
acolwell GONE FROM CHROMIUM 2014/07/15 18:49:26 Done.
duration_ = duration;
}
« no previous file with comments | « no previous file | media/base/stream_parser_buffer.cc » ('j') | media/base/stream_parser_buffer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698