summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libstagefrighthw/TIOMXPlugin.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/libstagefrighthw/TIOMXPlugin.cpp b/libstagefrighthw/TIOMXPlugin.cpp
index cff5e90..b04c7b9 100644
--- a/libstagefrighthw/TIOMXPlugin.cpp
+++ b/libstagefrighthw/TIOMXPlugin.cpp
@@ -19,7 +19,6 @@
#include <dlfcn.h>
#include <media/stagefright/HardwareAPI.h>
-#include <media/stagefright/MediaDebug.h>
namespace android {
@@ -132,11 +131,11 @@ OMX_ERRORTYPE TIOMXPlugin::getRolesOfComponent(
err = (*mGetRolesOfComponentHandle)(
const_cast<OMX_STRING>(name), &numRoles, array);
- CHECK_EQ(err, OMX_ErrorNone);
-
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;
@@ -146,7 +145,7 @@ OMX_ERRORTYPE TIOMXPlugin::getRolesOfComponent(
array = NULL;
}
- return OMX_ErrorNone;
+ return err;
}
} // namespace android