stagefright: allow OMX aliases by Codec2 after alias change
Fix misleading strncmp, and use strncmp only for checking beginning
of string.
Bug: 119631295
Change-Id: Ibdffb5b1844fc12e264148a05a8f8ab89e310c47
diff --git a/media/libstagefright/MediaCodec.cpp b/media/libstagefright/MediaCodec.cpp
index 2547888..c7da7c7 100644
--- a/media/libstagefright/MediaCodec.cpp
+++ b/media/libstagefright/MediaCodec.cpp
@@ -862,9 +862,9 @@
//static
sp<CodecBase> MediaCodec::GetCodecBase(const AString &name, const char *owner) {
if (owner) {
- if (strncmp(owner, "default", 8) == 0) {
+ if (strcmp(owner, "default") == 0) {
return new ACodec;
- } else if (strncmp(owner, "codec2", 7) == 0) {
+ } else if (strncmp(owner, "codec2", 6) == 0) {
return CreateCCodec();
}
}