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

Unified Diff: media/webm/webm_info_parser.cc

Issue 8921010: Revert 114030 - Adding support for incremental cluster parsing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years 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/webm/webm_constants.h ('k') | media/webm/webm_parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « media/webm/webm_constants.h ('k') | media/webm/webm_parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698