Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(919)

Unified Diff: media/blink/webmediaplayer_impl.cc

Issue 2413653002: Use NullAudioSink in WebMediaPlayerImpl if the audio sink is not OK. (Closed)
Patch Set: Update comment Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/blink/webmediaplayer_impl.cc
diff --git a/media/blink/webmediaplayer_impl.cc b/media/blink/webmediaplayer_impl.cc
index cdebe7739579127cc1db0a4aadd49269324e37b7..b764b367bd37e1e3b0ee9445b25c3f3adae489d6 100644
--- a/media/blink/webmediaplayer_impl.cc
+++ b/media/blink/webmediaplayer_impl.cc
@@ -250,9 +250,12 @@ WebMediaPlayerImpl::WebMediaPlayerImpl(
// TODO(xhwang): When we use an external Renderer, many methods won't work,
// e.g. GetCurrentFrameFromCompositor(). See http://crbug.com/434861
- // Use the null sink if no sink was provided.
+ // Use the null sink if no valid sink was provided.
audio_source_provider_ = new WebAudioSourceProviderImpl(
- params.audio_renderer_sink().get()
+ params.audio_renderer_sink().get() &&
+ params.audio_renderer_sink()
+ ->GetOutputDeviceInfo()
+ .device_status() == OUTPUT_DEVICE_STATUS_OK
? params.audio_renderer_sink()
: new NullAudioSink(media_task_runner_));
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698