Index: content/renderer/render_frame_impl.cc |
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc |
index f5d90c62c10cfa3267f72f938a5122b6eb5c275a..a856f876857c3b284297c9c833c39a38318c2ab7 100644 |
--- a/content/renderer/render_frame_impl.cc |
+++ b/content/renderer/render_frame_impl.cc |
@@ -4735,9 +4735,14 @@ WebMediaPlayer* RenderFrameImpl::CreateWebMediaPlayerForMediaStream( |
(android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0; |
UMA_HISTOGRAM_BOOLEAN("Platform.WebRtcNEONFound", found_neon); |
#endif // defined(OS_ANDROID) && defined(ARCH_CPU_ARMEL) |
- return new WebMediaPlayerMS(frame_, client, weak_factory_.GetWeakPtr(), |
- new RenderMediaLog(), |
- CreateRendererFactory()); |
+ scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner = |
+ RenderThreadImpl::current()->compositor_task_runner(); |
+ if (!compositor_task_runner.get()) |
+ compositor_task_runner = base::MessageLoop::current()->task_runner(); |
+ return new WebMediaPlayerMS( |
+ frame_, client, weak_factory_.GetWeakPtr(), new RenderMediaLog(), |
+ CreateRendererFactory(), |
+ compositor_task_runner); |
#else |
return NULL; |
#endif // defined(ENABLE_WEBRTC) |