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

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

Issue 1147453002: MSE: Increase log visibility when unfragmented MP4 causes parse failure (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased and addressed chcunningham's PS1 comments Created 5 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
Index: media/formats/mp4/box_definitions.cc
diff --git a/media/formats/mp4/box_definitions.cc b/media/formats/mp4/box_definitions.cc
index a08cb26d560ca1b5e99ce066a269017af5d90a9e..5a15240ebbc0f8b860fa55dba16daaa63d9fe68d 100644
--- a/media/formats/mp4/box_definitions.cc
+++ b/media/formats/mp4/box_definitions.cc
@@ -657,12 +657,15 @@ Movie::~Movie() {}
FourCC Movie::BoxType() const { return FOURCC_MOOV; }
bool Movie::Parse(BoxReader* reader) {
- return reader->ScanChildren() &&
- reader->ReadChild(&header) &&
- reader->ReadChildren(&tracks) &&
- // Media Source specific: 'mvex' required
- reader->ReadChild(&extends) &&
- reader->MaybeReadChildren(&pssh);
+ RCHECK(reader->ScanChildren() && reader->ReadChild(&header) &&
+ reader->ReadChildren(&tracks));
+
+ RCHECK_MEDIA_LOGGED(reader->ReadChild(&extends), reader->log_cb(),
+ "Detected unfragmented MP4. Media Source Extensions "
+ "require ISO BMFF moov to contain mvex to indicate that "
+ "Movie Fragments are to be expected.");
+
+ return reader->MaybeReadChildren(&pssh);
}
TrackFragmentDecodeTime::TrackFragmentDecodeTime() : decode_time(0) {}

Powered by Google App Engine
This is Rietveld 408576698