From fd1e188dc142a8a7adf36e854aa60464faedf0a0 Mon Sep 17 00:00:00 2001 From: Xiaosong Wei Date: Tue, 17 Dec 2013 23:05:29 +0800 Subject: 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 Signed-off-by: Bruce Beare Signed-off-by: Jack Ren --- media/libstagefright/omx/SoftVideoDecoderOMXComponent.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'media') 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; } -- cgit v1.1