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

Unified Diff: media/ffmpeg/ffmpeg_common.cc

Issue 2435603009: Use ffmpeg for opus decoding, no need to maintain our decoder. (Closed)
Patch Set: Created 4 years, 2 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
Index: media/ffmpeg/ffmpeg_common.cc
diff --git a/media/ffmpeg/ffmpeg_common.cc b/media/ffmpeg/ffmpeg_common.cc
index 8c4a55c953111de0613d6692408f739b541428b5..2b6100bb913fb4c0efbf43ef3251e0499e7c6fd9 100644
--- a/media/ffmpeg/ffmpeg_common.cc
+++ b/media/ffmpeg/ffmpeg_common.cc
@@ -329,21 +329,6 @@ bool AVCodecContextToAudioDecoderConfig(
int sample_rate = codec_context->sample_rate;
switch (codec) {
- case kCodecOpus:
- // |codec_context->sample_fmt| is not set by FFmpeg because Opus decoding
- // is not enabled in FFmpeg. It doesn't matter what value is set here, so
- // long as it's valid, the true sample format is selected inside the
- // decoder.
- sample_format = kSampleFormatF32;
-
- // Always use 48kHz for OPUS. Technically we should match to the highest
- // supported hardware sample rate among [8, 12, 16, 24, 48] kHz, but we
- // don't know the hardware sample rate at this point and those rates are
- // rarely used for output. See the "Input Sample Rate" section of the
- // spec: http://tools.ietf.org/html/draft-terriberry-oggopus-01#page-11
- sample_rate = 48000;
- break;
-
// For AC3/EAC3 we enable only demuxing, but not decoding, so FFmpeg does
// not fill |sample_fmt|.
case kCodecAC3:
@@ -390,7 +375,6 @@ bool AVCodecContextToAudioDecoderConfig(
// Verify that AudioConfig.bits_per_channel was calculated correctly for
// codecs that have |sample_fmt| set by FFmpeg.
switch (codec) {
- case kCodecOpus:
#if BUILDFLAG(ENABLE_AC3_EAC3_AUDIO_DEMUXING)
case kCodecAC3:
case kCodecEAC3:

Powered by Google App Engine
This is Rietveld 408576698