Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bc0c2c2d authored by Lajos Molnar's avatar Lajos Molnar Committed by Gerrit Code Review
Browse files

Merge "DO NOT MERGE: Fix for SW video decoder OMX profile/level query"

parents 940c688d fd1e188d
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -177,18 +177,19 @@ OMX_ERRORTYPE SoftVideoDecoderOMXComponent::internalGetParameter(
        {
            OMX_VIDEO_PARAM_PROFILELEVELTYPE *profileLevel =
                  (OMX_VIDEO_PARAM_PROFILELEVELTYPE *) params;
            OMX_U32 profileIndex = profileLevel->nProfileIndex;

            if (profileLevel->nPortIndex != kInputPortIndex) {
                ALOGE("Invalid port index: %" PRIu32, profileLevel->nPortIndex);
                return OMX_ErrorUnsupportedIndex;
            }

            if (index >= mNumProfileLevels) {
            if (profileIndex >= mNumProfileLevels) {
                return OMX_ErrorNoMore;
            }

            profileLevel->eProfile = mProfileLevels[index].mProfile;
            profileLevel->eLevel   = mProfileLevels[index].mLevel;
            profileLevel->eProfile = mProfileLevels[profileIndex].mProfile;
            profileLevel->eLevel   = mProfileLevels[profileIndex].mLevel;
            return OMX_ErrorNone;
        }