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

Unified Diff: media/formats/mp4/box_reader.h

Issue 264743016: Change H264AnnexBBitstreamConverter to use AVCDecoderConfigurationRecord. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Address CR comments. Created 6 years, 7 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/formats/mp4/box_definitions.cc ('k') | media/media.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/formats/mp4/box_reader.h
diff --git a/media/formats/mp4/box_reader.h b/media/formats/mp4/box_reader.h
index d4b608e78f9ea80c76f0dc6c95d20005d9b5c7ce..1ba0294bff3728799749fd862015053ee4b0e0ca 100644
--- a/media/formats/mp4/box_reader.h
+++ b/media/formats/mp4/box_reader.h
@@ -29,7 +29,10 @@ struct MEDIA_EXPORT Box {
class MEDIA_EXPORT BufferReader {
public:
BufferReader(const uint8* buf, const int size)
- : buf_(buf), size_(size), pos_(0) {}
+ : buf_(buf), size_(size), pos_(0) {
+ CHECK(buf);
+ CHECK_GE(size, 0);
+ }
bool HasBytes(int count) { return (pos() + count <= size()); }
« no previous file with comments | « media/formats/mp4/box_definitions.cc ('k') | media/media.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698