Index: media/webm/webm_info_parser.cc |
=================================================================== |
--- media/webm/webm_info_parser.cc (revision 114032) |
+++ media/webm/webm_info_parser.cc (working copy) |
@@ -17,17 +17,7 @@ |
WebMInfoParser::~WebMInfoParser() {} |
int WebMInfoParser::Parse(const uint8* buf, int size) { |
- timecode_scale_ = -1; |
- duration_ = -1; |
- |
- WebMListParser parser(kWebMIdInfo); |
- int result = parser.Parse(buf, size, this); |
- |
- if (result <= 0) |
- return result; |
- |
- // For now we do all or nothing parsing. |
- return parser.IsParsingComplete() ? result : 0; |
+ return WebMParseListElement(buf, size, kWebMIdInfo, 1, this); |
} |
bool WebMInfoParser::OnListStart(int id) { return true; } |
@@ -46,7 +36,7 @@ |
return true; |
if (timecode_scale_ != -1) { |
- DVLOG(1) << "Multiple values for id " << std::hex << id << " specified"; |
+ VLOG(1) << "Multiple values for id " << std::hex << id << " specified"; |
return false; |
} |
@@ -56,12 +46,12 @@ |
bool WebMInfoParser::OnFloat(int id, double val) { |
if (id != kWebMIdDuration) { |
- DVLOG(1) << "Unexpected float for id" << std::hex << id; |
+ VLOG(1) << "Unexpected float for id" << std::hex << id; |
return false; |
} |
if (duration_ != -1) { |
- DVLOG(1) << "Multiple values for duration."; |
+ VLOG(1) << "Multiple values for duration."; |
return false; |
} |