summaryrefslogtreecommitdiffstats
path: root/media/mp4
diff options
context:
space:
mode:
authorstrobe@google.com <strobe@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-30 18:28:16 +0000
committerstrobe@google.com <strobe@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-30 18:28:16 +0000
commit5add9450c83675e341dba1ef9e7f98800e7e2615 (patch)
tree44e227c2eaf21a3870d5c3f0e0cd77f651f2dff8 /media/mp4
parentba31c3844e6634a80c65ed813525fcfe554a4cfe (diff)
downloadchromium_src-5add9450c83675e341dba1ef9e7f98800e7e2615.zip
chromium_src-5add9450c83675e341dba1ef9e7f98800e7e2615.tar.gz
chromium_src-5add9450c83675e341dba1ef9e7f98800e7e2615.tar.bz2
Allow auxiliary data to come inside the 'moof' atom.
BUG= TEST=Manual, in browser Review URL: https://chromiumcodereview.appspot.com/10826056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148982 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/mp4')
-rw-r--r--media/mp4/mp4_stream_parser.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/media/mp4/mp4_stream_parser.cc b/media/mp4/mp4_stream_parser.cc
index 2b5eea3..d153d69 100644
--- a/media/mp4/mp4_stream_parser.cc
+++ b/media/mp4/mp4_stream_parser.cc
@@ -122,8 +122,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());