From 8addb43c8e7056e8a941318ce734274951e968b7 Mon Sep 17 00:00:00 2001 From: James Dong Date: Wed, 8 Feb 2012 12:58:33 -0800 Subject: Do not use MediaDebug in libstagefrighthw. Change-Id: If84f2ff815cc1cc0efdaded491784b0257a18532 --- libstagefrighthw/SEC_OMX_Plugin.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'libstagefrighthw') diff --git a/libstagefrighthw/SEC_OMX_Plugin.cpp b/libstagefrighthw/SEC_OMX_Plugin.cpp index efc8691..82497aa 100644 --- a/libstagefrighthw/SEC_OMX_Plugin.cpp +++ b/libstagefrighthw/SEC_OMX_Plugin.cpp @@ -19,7 +19,6 @@ #include #include -#include namespace android { @@ -125,12 +124,15 @@ OMX_ERRORTYPE SECOMXPlugin::getRolesOfComponent( err = (*mGetRolesOfComponentHandle)( const_cast(name), &numRoles2, array); - CHECK_EQ(err, OMX_ErrorNone); - CHECK_EQ(numRoles, numRoles2); + if (err == OMX_ErrorNone && numRoles != numRoles2) { + err = OMX_ErrorUndefined; + } for (OMX_U32 i = 0; i < numRoles; ++i) { - String8 s((const char *)array[i]); - roles->push(s); + if (err == OMX_ErrorNone) { + String8 s((const char *)array[i]); + roles->push(s); + } delete[] array[i]; array[i] = NULL; @@ -140,7 +142,7 @@ OMX_ERRORTYPE SECOMXPlugin::getRolesOfComponent( array = NULL; } - return OMX_ErrorNone; + return err; } } // namespace android -- cgit v1.1