Chromium Code Reviews| 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..7b54c3beabfa18ca7c5c213dc1662688b9c3d205 100644 |
| --- a/media/filters/stream_parser_factory.cc |
| +++ b/media/filters/stream_parser_factory.cc |
| @@ -107,15 +107,14 @@ 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") { |
| + if (base::HexStringToInt(tokens[2], &audio_object_type)) |
|
Peter Kasting
2014/07/26 01:17:49
Well, if you're still going to have two ifs here,
Will Harris
2014/07/26 01:25:06
Done.
|
| + 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) { |