summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorJames Dong <jdong@google.com>2011-09-12 19:56:23 -0700
committerJames Dong <jdong@google.com>2011-09-13 11:00:17 -0700
commit9a5e04438df742c297c5dbcdb60e6fd4d8f8321d (patch)
tree8c9ae8e852283e296194f4b06f3a2ca41d046113 /media
parent9215ea4cd8bc5f9c9770c5c34a009dc7c6068f86 (diff)
downloadframeworks_av-9a5e04438df742c297c5dbcdb60e6fd4d8f8321d.zip
frameworks_av-9a5e04438df742c297c5dbcdb60e6fd4d8f8321d.tar.gz
frameworks_av-9a5e04438df742c297c5dbcdb60e6fd4d8f8321d.tar.bz2
Change an assert failure due to unsupported level by HW AVC decoder and report the error to applications
Change-Id: I522a994981d86329ccc86c3b536b561dc6e40eeb related-to-bug: 5300618
Diffstat (limited to 'media')
-rwxr-xr-xmedia/libstagefright/OMXCodec.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp
index 9ab470b..6280f51 100755
--- a/media/libstagefright/OMXCodec.cpp
+++ b/media/libstagefright/OMXCodec.cpp
@@ -2452,13 +2452,16 @@ void OMXCodec::onCmdComplete(OMX_COMMANDTYPE cmd, OMX_U32 data) {
mOutputPortSettingsHaveChanged = formatChanged;
}
- enablePortAsync(portIndex);
-
- status_t err = allocateBuffersOnPort(portIndex);
-
+ status_t err = enablePortAsync(portIndex);
if (err != OK) {
- CODEC_LOGE("allocateBuffersOnPort failed (err = %d)", err);
+ CODEC_LOGE("enablePortAsync(%ld) failed (err = %d)", portIndex, err);
setState(ERROR);
+ } else {
+ err = allocateBuffersOnPort(portIndex);
+ if (err != OK) {
+ CODEC_LOGE("allocateBuffersOnPort failed (err = %d)", err);
+ setState(ERROR);
+ }
}
}
break;
@@ -2773,16 +2776,14 @@ void OMXCodec::disablePortAsync(OMX_U32 portIndex) {
freeBuffersOnPort(portIndex, true);
}
-void OMXCodec::enablePortAsync(OMX_U32 portIndex) {
+status_t OMXCodec::enablePortAsync(OMX_U32 portIndex) {
CHECK(mState == EXECUTING || mState == RECONFIGURING);
CHECK_EQ((int)mPortStatus[portIndex], (int)DISABLED);
mPortStatus[portIndex] = ENABLING;
CODEC_LOGV("sending OMX_CommandPortEnable(%ld)", portIndex);
- status_t err =
- mOMX->sendCommand(mNode, OMX_CommandPortEnable, portIndex);
- CHECK_EQ(err, (status_t)OK);
+ return mOMX->sendCommand(mNode, OMX_CommandPortEnable, portIndex);
}
void OMXCodec::fillOutputBuffers() {