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

Unified Diff: media/mp4/mp4_stream_parser.cc

Issue 10826056: Allow auxiliary data to come inside the 'moof' atom. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mp4/mp4_stream_parser.cc
diff --git a/media/mp4/mp4_stream_parser.cc b/media/mp4/mp4_stream_parser.cc
index 9d51959a3a32bbc8d45c0c4db8370c80e1093737..cf4120dd8c80eab4d53f557e91dca5d8622dd653 100644
--- a/media/mp4/mp4_stream_parser.cc
+++ b/media/mp4/mp4_stream_parser.cc
@@ -126,8 +126,14 @@ bool MP4StreamParser::ParseBox(bool* err) {
moof_head_ = queue_.head();
*err = !ParseMoof(reader.get());
- // Set up first mdat offset for ParseMDATsUntil()
+ // Set up first mdat offset for ReadMDATsUntil().
mdat_tail_ = queue_.head() + reader->size();
+
+ // Return early to avoid evicting 'moof' data from queue. Auxiliary info may
+ // be located anywhere in the file, including inside the 'moof' itself.
+ // (Since 'default-base-is-moof' is mandated, no data references can come
+ // before the head of the 'moof', so keeping this box around is sufficient.)
+ return !(*err);
} else {
DVLOG(2) << "Skipping unrecognized top-level box: "
<< FourCCToString(reader->type());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698