summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/FFMPEGSoftCodec.cpp
diff options
context:
space:
mode:
authorKeith Mok <kmok@cyngn.com>2015-12-01 11:17:09 -0800
committerKeith Mok <kmok@cyngn.com>2015-12-01 11:19:52 -0800
commitfb3719ce5ab99427b18d0588042234592ded1991 (patch)
treea2d587eda11f3cd03ff2d2633fd1fae36c530ac3 /media/libstagefright/FFMPEGSoftCodec.cpp
parent9ea60c76a3eb25d968bfc54e77721944d1b740e1 (diff)
downloadframeworks_av-fb3719ce5ab99427b18d0588042234592ded1991.zip
frameworks_av-fb3719ce5ab99427b18d0588042234592ded1991.tar.gz
frameworks_av-fb3719ce5ab99427b18d0588042234592ded1991.tar.bz2
stagefright: Fix cts testGetMaxSupportedInstances
Fix cts testGetMaxSupportedInstances on 64 bits system. In FFMPEGSoftCodec.cpp, it tries to get OMX parameter in function setRawAudioFormat by calling: OMX_PARAM_PORTDEFINITIONTYPE def; ... status_t err = OMXhandle->getParameter( nodeID, OMX_IndexParamPortDefinition, &def, sizeof(def)); However, this code runs in 64 bits, and mediaserver is running in 32 bits. sizeof(OMX_PARAM_PORTDEFINITIONTYPE) is equals to 112 vs 96 in 32 bits mode, since sizeof(OMX_PTR) are different. In SimpleSoftOMXComponent::internalGetParameter which runs in 32 bits mode, it checks defParams->nSize != sizeof(OMX_PARAM_PORTDEFINITIONTYPE) and fails. Declaring OMX_ANDROID_COMPILE_AS_32BIT_ON_64BIT_PLATFORMS in FFMPEGSoftCodec.cpp solves it. Change-Id: Ieb5a548c580e87c964c66f0b0d6ce8bb14dac690
Diffstat (limited to 'media/libstagefright/FFMPEGSoftCodec.cpp')
-rw-r--r--media/libstagefright/FFMPEGSoftCodec.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/media/libstagefright/FFMPEGSoftCodec.cpp b/media/libstagefright/FFMPEGSoftCodec.cpp
index fe86a03..2af53b3 100644
--- a/media/libstagefright/FFMPEGSoftCodec.cpp
+++ b/media/libstagefright/FFMPEGSoftCodec.cpp
@@ -14,6 +14,10 @@
* limitations under the License.
*/
+#ifdef __LP64__
+#define OMX_ANDROID_COMPILE_AS_32BIT_ON_64BIT_PLATFORMS
+#endif
+
//#define LOG_NDEBUG 0
#define LOG_TAG "FFMPEGSoftCodec"
#include <utils/Log.h>
@@ -330,7 +334,7 @@ status_t FFMPEGSoftCodec::setVideoFormat(
xerr = OMXhandle->setParameter(
nodeID, (OMX_INDEXTYPE)OMX_QcomIndexEnableExtnUserData,
- (OMX_PTR)&enableType, sizeof(enableType));
+ &enableType, sizeof(enableType));
if (xerr != OK) {
ALOGW("[%s] Failed to enable user-extradata", componentName);
}