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

Unified Diff: media/mp4/mp4_stream_parser.h

Issue 10834101: Fix MP4StreamParser discard behavior when retaining 'moof'. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tgt_offset -> offset 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 | media/mp4/mp4_stream_parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mp4/mp4_stream_parser.h
diff --git a/media/mp4/mp4_stream_parser.h b/media/mp4/mp4_stream_parser.h
index b950af2f75b907089843694c1f724368fc6baf3e..c27227e198b1114842feb475dd822760d2fc86d9 100644
--- a/media/mp4/mp4_stream_parser.h
+++ b/media/mp4/mp4_stream_parser.h
@@ -50,7 +50,13 @@ class MEDIA_EXPORT MP4StreamParser : public StreamParser {
bool EmitKeyNeeded(const TrackEncryption& track_encryption);
- bool ReadMDATsUntil(const int64 tgt_tail);
+ // To retain proper framing, each 'mdat' atom must be read; to limit memory
+ // usage, the atom's data needs to be discarded incrementally as frames are
+ // extracted from the stream. This function discards data from the stream up
+ // to |offset|, updating the |mdat_tail_| value so that framing can be
+ // retained after all 'mdat' information has been read.
+ // Returns 'true' on success, 'false' if there was an error.
+ bool ReadAndDiscardMDATsUntil(const int64 offset);
void ChangeState(State new_state);
« no previous file with comments | « no previous file | media/mp4/mp4_stream_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698