diff options
Diffstat (limited to 'content/browser/renderer_host/media/audio_input_renderer_host.cc')
-rw-r--r-- | content/browser/renderer_host/media/audio_input_renderer_host.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/content/browser/renderer_host/media/audio_input_renderer_host.cc b/content/browser/renderer_host/media/audio_input_renderer_host.cc index dda4850..23f8c91 100644 --- a/content/browser/renderer_host/media/audio_input_renderer_host.cc +++ b/content/browser/renderer_host/media/audio_input_renderer_host.cc @@ -212,7 +212,11 @@ void AudioInputRendererHost::OnCreateStream( VLOG(1) << "AudioInputRendererHost::OnCreateStream(stream_id=" << stream_id << ")"; DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); - DCHECK(LookupById(stream_id) == NULL); + // media::AudioParameters is validated in the deserializer. + if (LookupById(stream_id) != NULL) { + SendErrorMessage(stream_id); + return; + } media::AudioParameters audio_params(params); @@ -227,7 +231,6 @@ void AudioInputRendererHost::OnCreateStream( params.bits_per_sample(), params.frames_per_buffer()); } - DCHECK_GT(audio_params.frames_per_buffer(), 0); uint32 buffer_size = audio_params.GetBytesPerBuffer(); // Create a new AudioEntry structure. |