Index: media/gpu/android_video_decode_accelerator.cc |
diff --git a/media/gpu/android_video_decode_accelerator.cc b/media/gpu/android_video_decode_accelerator.cc |
index 5ea83cddfb82881f91be152e45eed77b0bfb1082..f9ddd0fd00d434308beab99551011a205f43d8e2 100644 |
--- a/media/gpu/android_video_decode_accelerator.cc |
+++ b/media/gpu/android_video_decode_accelerator.cc |
@@ -1416,7 +1416,11 @@ void AndroidVideoDecodeAccelerator::ActualDestroy() { |
// backed by hardware, else it may hang too. Post it to the construction |
// thread, and it'll get freed if things start working. If things are |
// already working, then it'll be freed soon. |
- if (media_codec_->IsSoftwareCodec()) { |
+ // |
+ // We require software codecs when |allow_autodetection_| is false, so use |
+ // the stored value as a proxy for whether the MediaCodec is software backed |
+ // or not. |
+ if (!codec_config_->allow_autodetection_) { |
liberato (no reviews please)
2016/06/30 14:59:27
it'll leak software codecs when mediaserver first
|
media_codec_.reset(); |
} else { |
manager->ConstructionTaskRunner()->DeleteSoon(FROM_HERE, |