Index: media/renderers/default_renderer_factory.cc |
diff --git a/media/renderers/default_renderer_factory.cc b/media/renderers/default_renderer_factory.cc |
index f18c381807b038426cf380fadb9218879bf795d2..0a65a550596c7de5a144620a2133ded1cb933ba4 100644 |
--- a/media/renderers/default_renderer_factory.cc |
+++ b/media/renderers/default_renderer_factory.cc |
@@ -72,20 +72,22 @@ ScopedVector<VideoDecoder> DefaultRendererFactory::CreateVideoDecoders( |
// Create our video decoders and renderer. |
ScopedVector<VideoDecoder> video_decoders; |
- // Prefer an external decoder since one will only exist if it is hardware |
- // accelerated. |
- if (decoder_factory_) |
- decoder_factory_->CreateVideoDecoders(media_task_runner, &video_decoders); |
- |
// |gpu_factories_| requires that its entry points be called on its |
// |GetTaskRunner()|. Since |pipeline_| will own decoders created from the |
// factories, require that their message loops are identical. |
DCHECK(!gpu_factories || |
(gpu_factories->GetTaskRunner() == media_task_runner.get())); |
- if (gpu_factories) |
+ // Prefer an external decoder since one will only exist if it is hardware |
+ // accelerated. |
+ if (gpu_factories) { |
+ if (decoder_factory_) { |
+ decoder_factory_->CreateVideoDecoders(media_task_runner, gpu_factories, |
+ &video_decoders); |
+ } |
video_decoders.push_back( |
new GpuVideoDecoder(gpu_factories, request_surface_cb)); |
+ } |
#if !defined(MEDIA_DISABLE_LIBVPX) |
video_decoders.push_back(new VpxVideoDecoder()); |