summaryrefslogtreecommitdiffstats
path: root/media/libstagefright
diff options
context:
space:
mode:
authorJamie Gennis <jgennis@google.com>2010-12-17 15:07:02 -0800
committerJamie Gennis <jgennis@google.com>2010-12-17 18:26:28 -0800
commitfd8b75afddb189d6fb14d3f3e17062c95229b15a (patch)
treeec177318d72cea04bb641deaf708e4b9da0ef6f1 /media/libstagefright
parenta69293a00d8a3320fc5750eb439bd3e809d0a821 (diff)
downloadframeworks_base-fd8b75afddb189d6fb14d3f3e17062c95229b15a.zip
frameworks_base-fd8b75afddb189d6fb14d3f3e17062c95229b15a.tar.gz
frameworks_base-fd8b75afddb189d6fb14d3f3e17062c95229b15a.tar.bz2
Change a Stagefright assert to an error check.
During OMX codec initialization it is possible that buffer allocation fails. This changes Stagefright to set an error state and abort initialization rather than crashing with an assert failure when that happens. Change-Id: I2fc2fadfe75657cdbf649cc8cafd2e4c251a5f8b Bug: 3282700
Diffstat (limited to 'media/libstagefright')
-rw-r--r--media/libstagefright/OMXCodec.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp
index 69ab75a..352f9fb 100644
--- a/media/libstagefright/OMXCodec.cpp
+++ b/media/libstagefright/OMXCodec.cpp
@@ -1536,7 +1536,9 @@ status_t OMXCodec::init() {
}
err = allocateBuffers();
- CHECK_EQ(err, (status_t)OK);
+ if (err != (status_t)OK) {
+ return err;
+ }
if (mQuirks & kRequiresLoadedToIdleAfterAllocation) {
err = mOMX->sendCommand(mNode, OMX_CommandStateSet, OMX_StateIdle);