diff options
author | tomfinegan@chromium.org <tomfinegan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-16 02:42:46 +0000 |
---|---|---|
committer | tomfinegan@chromium.org <tomfinegan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-16 02:42:46 +0000 |
commit | e1902fc9a52c499433ca440b1d03d70f7461d65e (patch) | |
tree | 6487194db9efd2dbfa927db800112cedd1234697 /media/ffmpeg | |
parent | 5567cc19fabb03117c6d959a9e141b2ba661b40c (diff) | |
download | chromium_src-e1902fc9a52c499433ca440b1d03d70f7461d65e.zip chromium_src-e1902fc9a52c499433ca440b1d03d70f7461d65e.tar.gz chromium_src-e1902fc9a52c499433ca440b1d03d70f7461d65e.tar.bz2 |
media: Fix Opus support, and handle bad timestamps correctly in the Opus wrapper.
- Recent changes to ffmpeg_common broke support for Opus. The check fails
because Opus support is not enabled in FFmpeg, which causes the FFmpeg
codec context to contain an invalid sample format value. Avoid the problem
by skipping a DCHECK for Opus input.
- Add missing return when non-monotonically increasing timestamps are
detected by the OpusAudioDecoder. This fixes a crash when attempting to
seek the Ogg file referenced in crbug.com/168524.
BUG=168524
TEST=Opus audio in WebM containers plays back with the flag
--enable-opus-playback
Review URL: https://chromiumcodereview.appspot.com/11888011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@177061 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/ffmpeg')
-rw-r--r-- | media/ffmpeg/ffmpeg_common.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/media/ffmpeg/ffmpeg_common.cc b/media/ffmpeg/ffmpeg_common.cc index f87825e..8b81e01 100644 --- a/media/ffmpeg/ffmpeg_common.cc +++ b/media/ffmpeg/ffmpeg_common.cc @@ -285,8 +285,10 @@ void AVCodecContextToAudioDecoderConfig( codec_context->extradata_size, false, // Not encrypted. true); - DCHECK_EQ(av_get_bytes_per_sample(codec_context->sample_fmt) * 8, - config->bits_per_channel()); + if (codec != kCodecOpus) { + DCHECK_EQ(av_get_bytes_per_sample(codec_context->sample_fmt) * 8, + config->bits_per_channel()); + } } void AudioDecoderConfigToAVCodecContext(const AudioDecoderConfig& config, |