Index: media/gpu/avda_codec_allocator.cc |
diff --git a/media/gpu/avda_codec_allocator.cc b/media/gpu/avda_codec_allocator.cc |
index b8b5e7b95667ed2e938007dd5279269f3bd2b4cf..cf98d93d3c093444a5e8b7baad43f9661b882bd9 100644 |
--- a/media/gpu/avda_codec_allocator.cc |
+++ b/media/gpu/avda_codec_allocator.cc |
@@ -26,9 +26,6 @@ namespace media { |
namespace { |
-base::LazyInstance<AVDACodecAllocator>::Leaky g_avda_codec_allocator = |
- LAZY_INSTANCE_INITIALIZER; |
- |
// Give tasks 800ms before considering them hung. MediaCodec.configure() calls |
// typically take 100-200ms on a N5, so 800ms is expected to very rarely result |
// in false positives. Also, false positives have low impact because we resume |
@@ -75,7 +72,8 @@ bool AVDACodecAllocator::HangDetector::IsThreadLikelyHung() { |
// static |
AVDACodecAllocator* AVDACodecAllocator::Instance() { |
- return g_avda_codec_allocator.Pointer(); |
+ static AVDACodecAllocator* allocator = new AVDACodecAllocator(); |
+ return allocator; |
} |
bool AVDACodecAllocator::StartThread(AVDACodecAllocatorClient* client) { |