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..71d5a9b4d005b1aa29cea7bb6608d6015ee4623f 100644 |
| --- a/media/filters/stream_parser_factory.cc |
| +++ b/media/filters/stream_parser_factory.cc |
| @@ -105,17 +105,17 @@ 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") { |
|
DaleCurtis
2014/07/26 01:06:38
== mp4a?
Will Harris
2014/07/26 01:15:54
Done.
|
| + int audio_object_type; |
|
Peter Kasting
2014/07/26 01:01:36
This works too, but I was suggesting leaving this
Will Harris
2014/07/26 01:15:53
Wow MSVC is crazy - it didn't like it when I made
|
| + if (base::HexStringToInt(tokens[2], &audio_object_type)) { |
|
Peter Kasting
2014/07/26 01:01:36
Nit: No {}
Will Harris
2014/07/26 01:15:54
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) { |