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

Unified Diff: media/formats/webm/webm_audio_client.cc

Issue 390543002: Always use 48kHz for OPUS decoding. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Test all teh things. 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 | « media/filters/pipeline_integration_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/formats/webm/webm_audio_client.cc
diff --git a/media/formats/webm/webm_audio_client.cc b/media/formats/webm/webm_audio_client.cc
index 6fe9a8434f23b0fbfe206d508230a7ea666a256f..e0d382c256b12707aafd0b8a78c1679a16c72d81 100644
--- a/media/formats/webm/webm_audio_client.cc
+++ b/media/formats/webm/webm_audio_client.cc
@@ -58,6 +58,11 @@ bool WebMAudioClient::InitializeConfig(
if (output_samples_per_second_ > 0)
samples_per_second = output_samples_per_second_;
+ // Always use 48kHz for OPUS. See the "Input Sample Rate" section of the
+ // spec: http://tools.ietf.org/html/draft-terriberry-oggopus-01#page-11
+ if (audio_codec == kCodecOpus)
+ samples_per_second = 48000;
+
const uint8* extra_data = NULL;
size_t extra_data_size = 0;
if (codec_private.size() > 0) {
« no previous file with comments | « media/filters/pipeline_integration_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698