Merge "stagefright: fix finding hardware codec"
diff --git a/media/libstagefright/MediaCodecList.cpp b/media/libstagefright/MediaCodecList.cpp
index f75706b..8afb7e9 100644
--- a/media/libstagefright/MediaCodecList.cpp
+++ b/media/libstagefright/MediaCodecList.cpp
@@ -1165,7 +1165,9 @@
CHECK(info != NULL);
AString componentName = info->getCodecName();
- if (!((flags & kHardwareCodecsOnly) && !isSoftwareCodec(componentName))) {
+ if ((flags & kHardwareCodecsOnly) && isSoftwareCodec(componentName)) {
+ ALOGV("skipping SW codec '%s'", componentName.c_str());
+ } else {
matches->push(componentName);
ALOGV("matching '%s'", componentName.c_str());
}