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

Unified Diff: media/gpu/android_video_decode_accelerator.cc

Issue 2114473002: Remove usage of MediaCodec.getName(), use proxy instead. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix build. Created 4 years, 6 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 | « media/base/android/sdk_media_codec_bridge.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « media/base/android/sdk_media_codec_bridge.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698