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