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
gugelfrei
Lajos Molnar 6 years ago
parent 3bc3a5fd22
commit aa1523c14a

@ -862,9 +862,9 @@ static CodecBase *CreateCCodec() {
//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();
}
}

Loading…
Cancel
Save