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

Unified Diff: media/filters/source_buffer_state.cc

Issue 2472823002: DO NOT LAND - Hacked MSE mp3 support, assuming addSourceBuffer /mp4; codecs="mp4a.40.2" (Closed)
Patch Set: Created 4 years, 1 month 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/mp4_stream_parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/source_buffer_state.cc
diff --git a/media/filters/source_buffer_state.cc b/media/filters/source_buffer_state.cc
index 5d692c44dde081715cc57842c09a438bb2b590dc..540140bcbfd4035cf9516fa5b1daffdd5403ada8 100644
--- a/media/filters/source_buffer_state.cc
+++ b/media/filters/source_buffer_state.cc
@@ -555,13 +555,18 @@ bool SourceBufferState::OnNewConfigs(
<< " config: " << audio_config.AsHumanReadableString();
DCHECK(audio_config.IsValidConfig());
- const auto& it = std::find(expected_acodecs.begin(),
- expected_acodecs.end(), audio_config.codec());
+ auto it = std::find(expected_acodecs.begin(), expected_acodecs.end(),
+ audio_config.codec());
if (it == expected_acodecs.end()) {
MEDIA_LOG(ERROR, media_log_) << "Audio stream codec "
<< GetCodecName(audio_config.codec())
<< " doesn't match SourceBuffer codecs.";
- return false;
+ // BIG TODO remove HACK
+ if (audio_config.codec() == kCodecMP3) {
+ MEDIA_LOG(INFO, media_log_) << "Hacking mp3 support";
+ it = expected_acodecs.begin(); // assume only 1....
+ } else
+ return false;
}
expected_acodecs.erase(it);
« no previous file with comments | « no previous file | media/formats/mp4/mp4_stream_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698