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

Unified Diff: media/mp4/mp4_stream_parser.cc

Issue 11280301: Roll FFMpeg for M26. Fix ffmpeg float audio decoding. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... rebase Created 7 years, 12 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 | « media/filters/pipeline_integration_test.cc ('k') | media/webm/webm_stream_parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mp4/mp4_stream_parser.cc
diff --git a/media/mp4/mp4_stream_parser.cc b/media/mp4/mp4_stream_parser.cc
index 69a35f28759090e5860c12cfc0bbd861971404eb..38fc7d24139d9f0b20ebfed9064616086ca8789b 100644
--- a/media/mp4/mp4_stream_parser.cc
+++ b/media/mp4/mp4_stream_parser.cc
@@ -205,8 +205,20 @@ bool MP4StreamParser::ParseMoov(BoxReader* reader) {
return false;
}
+ SampleFormat sample_format;
+ if (entry.samplesize == 8) {
+ sample_format = kSampleFormatU8;
+ } else if (entry.samplesize == 16) {
+ sample_format = kSampleFormatS16;
+ } else if (entry.samplesize == 32) {
+ sample_format = kSampleFormatS32;
+ } else {
+ LOG(ERROR) << "Unsupported sample size.";
+ return false;
+ }
+
bool is_encrypted = entry.sinf.info.track_encryption.is_encrypted;
- audio_config.Initialize(kCodecAAC, entry.samplesize,
+ audio_config.Initialize(kCodecAAC, sample_format,
aac.channel_layout(),
aac.GetOutputSamplesPerSecond(has_sbr_),
NULL, 0, is_encrypted, false);
« no previous file with comments | « media/filters/pipeline_integration_test.cc ('k') | media/webm/webm_stream_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698