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

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

Issue 1718773002: Parse ELNG box in MP4 container Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 | « media/formats/mp4/box_reader.h ('k') | media/formats/mp4/fourccs.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/formats/mp4/box_reader.cc
diff --git a/media/formats/mp4/box_reader.cc b/media/formats/mp4/box_reader.cc
index 91e406d227f07ad0ca4f22fabd7946a501721fd8..f3ed5e54448658ba8a5841428acd0743c9bd7bfd 100644
--- a/media/formats/mp4/box_reader.cc
+++ b/media/formats/mp4/box_reader.cc
@@ -67,6 +67,19 @@ bool BufferReader::ReadVec(std::vector<uint8_t>* vec, uint64_t count) {
return true;
}
+bool BufferReader::ReadString(std::string* v) {
+ RCHECK(v);
+ *v = "";
+ uint8_t c = 0;
+ while (Read1(&c) && c != 0) {
+ v->push_back(c);
+ }
+ // Return error if we didn't find the terminating zero character.
+ if (c != 0)
+ return false;
+ return true;
+}
+
bool BufferReader::SkipBytes(uint64_t bytes) {
RCHECK(HasBytes(bytes));
pos_ += bytes;
« no previous file with comments | « media/formats/mp4/box_reader.h ('k') | media/formats/mp4/fourccs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698