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

Unified Diff: media/filters/stream_parser_factory.cc

Issue 413393006: Fix two uninitialized variables in media (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: style nits mostly back to ps2 Created 6 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/formats/mp4/box_definitions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/stream_parser_factory.cc
diff --git a/media/filters/stream_parser_factory.cc b/media/filters/stream_parser_factory.cc
index dd0e95aa82b4c3a69667f894d931aa8ec1600529..daeaea23b7b112408b71e7aebf883a9ac034289c 100644
--- a/media/filters/stream_parser_factory.cc
+++ b/media/filters/stream_parser_factory.cc
@@ -105,17 +105,16 @@ static const int kAACSBRObjectType = 5;
static int GetMP4AudioObjectType(const std::string& codec_id,
const LogCB& log_cb) {
- int audio_object_type;
std::vector<std::string> tokens;
- if (Tokenize(codec_id, ".", &tokens) != 3 ||
- tokens[0] != "mp4a" || tokens[1] != "40" ||
- !base::HexStringToInt(tokens[2], &audio_object_type)) {
- MEDIA_LOG(log_cb) << "Malformed mimetype codec '" << codec_id << "'";
- return -1;
+ if (Tokenize(codec_id, ".", &tokens) == 3 &&
+ tokens[0] == "mp4a" && tokens[1] == "40") {
+ int audio_object_type;
+ if (base::HexStringToInt(tokens[2], &audio_object_type))
+ return audio_object_type;
}
-
- return audio_object_type;
+ MEDIA_LOG(log_cb) << "Malformed mimetype codec '" << codec_id << "'";
+ return -1;
}
bool ValidateMP4ACodecID(const std::string& codec_id, const LogCB& log_cb) {
« no previous file with comments | « no previous file | media/formats/mp4/box_definitions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698