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

Unified Diff: media/formats/mp4/box_definitions.cc

Issue 2368773002: MSE: Recognize "unknown duration" in ISOBMFF mvhd version 0, duration max uint32 case (Closed)
Patch Set: Address review comments Created 4 years, 3 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.h ('k') | media/formats/mp4/mp4_stream_parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/formats/mp4/box_definitions.cc
diff --git a/media/formats/mp4/box_definitions.cc b/media/formats/mp4/box_definitions.cc
index 9018f89c063950cea029caf3591e4733b372e421..e16e5fb64798f96b89bdff2246d0ef0e0de7c199 100644
--- a/media/formats/mp4/box_definitions.cc
+++ b/media/formats/mp4/box_definitions.cc
@@ -286,7 +286,8 @@ bool ProtectionSchemeInfo::Parse(BoxReader* reader) {
}
MovieHeader::MovieHeader()
- : creation_time(0),
+ : version(0),
+ creation_time(0),
modification_time(0),
timescale(0),
duration(0),
@@ -299,8 +300,9 @@ FourCC MovieHeader::BoxType() const { return FOURCC_MVHD; }
bool MovieHeader::Parse(BoxReader* reader) {
RCHECK(reader->ReadFullBoxHeader());
+ version = reader->version();
- if (reader->version() == 1) {
+ if (version == 1) {
RCHECK(reader->Read8(&creation_time) &&
reader->Read8(&modification_time) &&
reader->Read4(&timescale) &&
« no previous file with comments | « media/formats/mp4/box_definitions.h ('k') | media/formats/mp4/mp4_stream_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698