summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorscherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-21 21:56:28 +0000
committerscherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-21 21:56:28 +0000
commit7d40674e06b45c1f7af1cbba7d49ec27928c246e (patch)
tree7a51b32cc25cc3700d89026907eb3318f146b36d
parent8c3062b166e54c94c30e752b49bd159b9dce7442 (diff)
downloadchromium_src-7d40674e06b45c1f7af1cbba7d49ec27928c246e.zip
chromium_src-7d40674e06b45c1f7af1cbba7d49ec27928c246e.tar.gz
chromium_src-7d40674e06b45c1f7af1cbba7d49ec27928c246e.tar.bz2
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
-rw-r--r--media/filters/ffmpeg_audio_decoder.cc7
1 files 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;
}