diff options
author | Xiaosong Wei <xiaosong.wei@intel.com> | 2013-12-17 23:05:29 +0800 |
---|---|---|
committer | Lajos Molnar <lajos@google.com> | 2014-06-24 17:55:44 +0000 |
commit | fd1e188dc142a8a7adf36e854aa60464faedf0a0 (patch) | |
tree | 13bd35a2315fb7ac4b6c7ae85c980ea420bc95c4 /media | |
parent | 940c688d76828ffd83929c661e75b5197903d30f (diff) | |
download | frameworks_av-fd1e188dc142a8a7adf36e854aa60464faedf0a0.zip frameworks_av-fd1e188dc142a8a7adf36e854aa60464faedf0a0.tar.gz frameworks_av-fd1e188dc142a8a7adf36e854aa60464faedf0a0.tar.bz2 |
DO NOT MERGE: Fix for SW video decoder OMX profile/level query
get the correct profile index from the input param and pass it to
profileLevel array to get the corresponding profile/level
Change-Id: I582961c0afb53c1781af7fb94226a23e5fdb96cf
Signed-off-by: Xiaosong Wei <xiaosong.wei@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Diffstat (limited to 'media')
-rw-r--r-- | media/libstagefright/omx/SoftVideoDecoderOMXComponent.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/media/libstagefright/omx/SoftVideoDecoderOMXComponent.cpp b/media/libstagefright/omx/SoftVideoDecoderOMXComponent.cpp index eb9fcf7..20a7076 100644 --- a/media/libstagefright/omx/SoftVideoDecoderOMXComponent.cpp +++ b/media/libstagefright/omx/SoftVideoDecoderOMXComponent.cpp @@ -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; } |