summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorscherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-26 21:14:16 +0000
committerscherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-26 21:14:16 +0000
commit46491f691e2d322192769544f2d7c6a82deaaf4b (patch)
tree1c56d00f6ff9a591fea63412cb103d0a744f87f2 /media
parent6b9b735dc9ba95674f2ae3db94ef13bcfc7dada7 (diff)
downloadchromium_src-46491f691e2d322192769544f2d7c6a82deaaf4b.zip
chromium_src-46491f691e2d322192769544f2d7c6a82deaaf4b.tar.gz
chromium_src-46491f691e2d322192769544f2d7c6a82deaaf4b.tar.bz2
Fixed bug in AudioRendererBase and made AudioRendererImpl check for audio devices.
TBR=hclam Review URL: http://codereview.chromium.org/42660 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12602 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-rw-r--r--media/filters/audio_renderer_base.cc2
-rw-r--r--media/filters/audio_renderer_impl.cc3
2 files changed, 3 insertions, 2 deletions
diff --git a/media/filters/audio_renderer_base.cc b/media/filters/audio_renderer_base.cc
index 548586e..880ca37 100644
--- a/media/filters/audio_renderer_base.cc
+++ b/media/filters/audio_renderer_base.cc
@@ -35,7 +35,7 @@ void AudioRendererBase::Stop() {
OnStop();
AutoLock auto_lock(lock_);
- while (queue_.empty()) {
+ while (!queue_.empty()) {
queue_.front()->Release();
queue_.pop_front();
}
diff --git a/media/filters/audio_renderer_impl.cc b/media/filters/audio_renderer_impl.cc
index 6412d38..7b66e14 100644
--- a/media/filters/audio_renderer_impl.cc
+++ b/media/filters/audio_renderer_impl.cc
@@ -29,7 +29,8 @@ bool AudioRendererImpl::IsMediaFormatSupported(
int channels;
int sample_rate;
int sample_bits;
- return ParseMediaFormat(media_format, &channels, &sample_rate, &sample_bits);
+ return AudioManager::GetAudioManager()->HasAudioDevices() &&
+ ParseMediaFormat(media_format, &channels, &sample_rate, &sample_bits);
}
void AudioRendererImpl::SetPlaybackRate(float playback_rate) {