From 7d40674e06b45c1f7af1cbba7d49ec27928c246e Mon Sep 17 00:00:00 2001 From: "scherkus@chromium.org" Date: Thu, 21 Oct 2010 21:56:28 +0000 Subject: Fixed bug 57194 by removing the DCHECKs and replacing them with a DLOG in the error case. The DCHECK cases are already handled and can occur because FFmpeg does not return an error when it encounters them. Patch by ddorwin@chromium.org: http://codereview.chromium.org/4024002/show BUG=57194 TEST=Load a .m2ts file, http://iexploder.googlecode.com/svn/trunk/src/media/blank.wav, and http://www.deafmac.org/html5/grinchsample.mp4 (before issue 56570 is fixed). git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63431 0039d316-1c4b-4281-b951-d872f2087c98 --- media/filters/ffmpeg_audio_decoder.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/media/filters/ffmpeg_audio_decoder.cc b/media/filters/ffmpeg_audio_decoder.cc index 178504e..e8abeac 100644 --- a/media/filters/ffmpeg_audio_decoder.cc +++ b/media/filters/ffmpeg_audio_decoder.cc @@ -58,14 +58,15 @@ void FFmpegAudioDecoder::DoInitialize(DemuxerStream* demuxer_stream, // Grab the AVStream's codec context and make sure we have sensible values. codec_context_ = av_stream->codec; int bps = av_get_bits_per_sample_format(codec_context_->sample_fmt); - DCHECK_GT(codec_context_->channels, 0); - DCHECK_GT(bps, 0); - DCHECK_GT(codec_context_->sample_rate, 0); if (codec_context_->channels <= 0 || codec_context_->channels > Limits::kMaxChannels || bps <= 0 || bps > Limits::kMaxBitsPerSample || codec_context_->sample_rate <= 0 || codec_context_->sample_rate > Limits::kMaxSampleRate) { + DLOG(WARNING) << "Invalid audio stream -" + << " channels: " << codec_context_->channels + << " bps: " << bps + << " sample rate: " << codec_context_->sample_rate; return; } -- cgit v1.1