summaryrefslogtreecommitdiffstats
path: root/media
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
commit60693ddde0e435def1617848f545c78cec452766 (patch)
treef85f5a3cf18c2bdb1fd69c21d9014dcbb3ef178e /media
parente071b055cee301d71335519601474c62b10af411 (diff)
downloadframeworks_av-60693ddde0e435def1617848f545c78cec452766.zip
frameworks_av-60693ddde0e435def1617848f545c78cec452766.tar.gz
frameworks_av-60693ddde0e435def1617848f545c78cec452766.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')
-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);