| 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());
|
|
|