summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Dong <jdong@google.com>2012-02-08 14:19:57 -0800
committerJames Dong <jdong@google.com>2012-02-10 13:47:17 -0800
commita668ffc93bd0eef29b143e0335bb63f69dc17dd8 (patch)
tree854233c480ccacec4e07cfb8ff88a5066e654fbb
parentc3dee7890047bad1136078f0f6e2b6d1a9a24947 (diff)
downloadmsm7k-a668ffc93bd0eef29b143e0335bb63f69dc17dd8.tar.gz
Don't use MediaDebug in libstagefrighthw
Change-Id: I933a32dbf84e2cb630c48ae06cf286f83092cdcb
-rw-r--r--libstagefrighthw/QComOMXPlugin.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/libstagefrighthw/QComOMXPlugin.cpp b/libstagefrighthw/QComOMXPlugin.cpp
index 1663815..e93fb85 100644
--- a/libstagefrighthw/QComOMXPlugin.cpp
+++ b/libstagefrighthw/QComOMXPlugin.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 QComOMXPlugin::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 QComOMXPlugin::getRolesOfComponent(
array = NULL;
}
- return OMX_ErrorNone;
+ return err;
}
} // namespace android