summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Dong <jdong@google.com>2012-02-08 14:19:22 -0800
committerJames Dong <jdong@google.com>2012-02-10 13:39:19 -0800
commit74edf7544704de2061e5efeb6ac383087b15adf5 (patch)
tree6caa6b7fdb9dc1b7f28769d4462f6013936494ef
parentdb4ddcbf596a9127521cbc6c8fc69b20bdd4d700 (diff)
downloadomap3-74edf7544704de2061e5efeb6ac383087b15adf5.tar.gz
Don't use MediaDebug in libstagefrighthw
Change-Id: I3aba50fca8fbe21b85a07b9913b14ad384f1e728
-rw-r--r--libstagefrighthw/TIOMXPlugin.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/libstagefrighthw/TIOMXPlugin.cpp b/libstagefrighthw/TIOMXPlugin.cpp
index 43c3c49..dd17ee7 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 {
@@ -124,12 +123,15 @@ OMX_ERRORTYPE TIOMXPlugin::getRolesOfComponent(
err = (*mGetRolesOfComponentHandle)(
const_cast<OMX_STRING>(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;
@@ -139,7 +141,7 @@ OMX_ERRORTYPE TIOMXPlugin::getRolesOfComponent(
array = NULL;
}
- return OMX_ErrorNone;
+ return err;
}
} // namespace android