summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/codecs
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2011-11-10 19:39:34 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2011-11-10 19:39:34 +0000
commite9a919b178a75f4cb70322c02c9c8e2756fb5ea1 (patch)
tree16191b32064a586931cc2c48ae96b5773915a2c7 /media/libstagefright/codecs
parent32beb277bc4d71cb587258e8195dcbca2da84ed9 (diff)
parentbb3e9ebcc7fd5823164b54835b56371f317189bb (diff)
downloadframeworks_av-e9a919b178a75f4cb70322c02c9c8e2756fb5ea1.zip
frameworks_av-e9a919b178a75f4cb70322c02c9c8e2756fb5ea1.tar.gz
frameworks_av-e9a919b178a75f4cb70322c02c9c8e2756fb5ea1.tar.bz2
am ec04f4ac: am 7c063cf9: Merge "There\'s no point in trying to continue to decode after an error was signalled." into ics-mr1
* commit 'ec04f4ac23e5fe8f90267d09ddda8c0aa684c147': There's no point in trying to continue to decode after an error was signalled.
Diffstat (limited to 'media/libstagefright/codecs')
-rw-r--r--media/libstagefright/codecs/on2/h264dec/SoftAVC.cpp17
-rw-r--r--media/libstagefright/codecs/on2/h264dec/SoftAVC.h2
2 files changed, 11 insertions, 8 deletions
diff --git a/media/libstagefright/codecs/on2/h264dec/SoftAVC.cpp b/media/libstagefright/codecs/on2/h264dec/SoftAVC.cpp
index 740c957..dede3ac 100644
--- a/media/libstagefright/codecs/on2/h264dec/SoftAVC.cpp
+++ b/media/libstagefright/codecs/on2/h264dec/SoftAVC.cpp
@@ -76,7 +76,8 @@ SoftAVC::SoftAVC(
mPicId(0),
mHeadersDecoded(false),
mEOSStatus(INPUT_DATA_AVAILABLE),
- mOutputPortSettingsChange(NONE) {
+ mOutputPortSettingsChange(NONE),
+ mSignalledError(false) {
initPorts();
CHECK_EQ(initDecoder(), (status_t)OK);
}
@@ -287,7 +288,7 @@ OMX_ERRORTYPE SoftAVC::getConfig(
}
void SoftAVC::onQueueFilled(OMX_U32 portIndex) {
- if (mOutputPortSettingsChange != NONE) {
+ if (mSignalledError || mOutputPortSettingsChange != NONE) {
return;
}
@@ -298,7 +299,6 @@ void SoftAVC::onQueueFilled(OMX_U32 portIndex) {
List<BufferInfo *> &inQueue = getPortQueue(kInputPortIndex);
List<BufferInfo *> &outQueue = getPortQueue(kOutputPortIndex);
H264SwDecRet ret = H264SWDEC_PIC_RDY;
- status_t err = OK;
bool portSettingsChanged = false;
while ((mEOSStatus != INPUT_DATA_AVAILABLE || !inQueue.empty())
&& outQueue.size() == kNumOutputBuffers) {
@@ -372,7 +372,12 @@ void SoftAVC::onQueueFilled(OMX_U32 portIndex) {
inPicture.dataLen = 0;
if (ret < 0) {
LOGE("Decoder failed: %d", ret);
- err = ERROR_MALFORMED;
+
+ notify(OMX_EventError, OMX_ErrorUndefined,
+ ERROR_MALFORMED, NULL);
+
+ mSignalledError = true;
+ return;
}
}
}
@@ -400,10 +405,6 @@ void SoftAVC::onQueueFilled(OMX_U32 portIndex) {
uint8_t *data = (uint8_t *) decodedPicture.pOutputPicture;
drainOneOutputBuffer(picId, data);
}
-
- if (err != OK) {
- notify(OMX_EventError, OMX_ErrorUndefined, err, NULL);
- }
}
}
diff --git a/media/libstagefright/codecs/on2/h264dec/SoftAVC.h b/media/libstagefright/codecs/on2/h264dec/SoftAVC.h
index 1cc85e8..879b014 100644
--- a/media/libstagefright/codecs/on2/h264dec/SoftAVC.h
+++ b/media/libstagefright/codecs/on2/h264dec/SoftAVC.h
@@ -88,6 +88,8 @@ private:
};
OutputPortSettingChange mOutputPortSettingsChange;
+ bool mSignalledError;
+
void initPorts();
status_t initDecoder();
void updatePortDefinitions();