diff options
author | Weian Chen <weian.chen@intel.com> | 2012-07-27 04:55:11 -0400 |
---|---|---|
committer | Shuo Gao <shuo.gao@intel.com> | 2012-08-31 11:22:11 +0800 |
commit | 520c3c74d701532759e12c3b54d43b415afcb6d2 (patch) | |
tree | e4697ba615aa8dff1e4789d3bdb53e6522935869 /media | |
parent | 5b15adfe9e5ee9a92b5f0a2853246fce170d4eef (diff) | |
download | frameworks_av-520c3c74d701532759e12c3b54d43b415afcb6d2.zip frameworks_av-520c3c74d701532759e12c3b54d43b415afcb6d2.tar.gz frameworks_av-520c3c74d701532759e12c3b54d43b415afcb6d2.tar.bz2 |
OMXCodec: enhance error handling of OMX IL client
Original design doesn't handle event EMPTY_BUFFER_DONE and
FILL_BUFFER_DONE which leads to buffer status mess issue,
and in turn leads to mediaserver crash.
Here we will handle those 2 events anyway to fix this.
Change-Id: Ia90b46ea7ec6026d6fda5d33fef6773435788b04
Author: Tianmi Chen<tianmi.chen@intel.com>
Signed-off-by: Tianmi Chen<tianmi.chen@intel.com>
Signed-off-by: Weian Chen <weian.chen@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 49066, 27054
Diffstat (limited to 'media')
-rwxr-xr-x | media/libstagefright/OMXCodec.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp index fde7ebf..a6636a1 100755 --- a/media/libstagefright/OMXCodec.cpp +++ b/media/libstagefright/OMXCodec.cpp @@ -2048,9 +2048,13 @@ int64_t OMXCodec::getDecodingTimeUs() { } void OMXCodec::on_message(const omx_message &msg) { + // even in error state, we still need to process EMPTY_BUFFER_DONE + // and FILL_BUFFER_DONE event, or we will run into mediaserver crash issue if (mState == ERROR) { - ALOGW("Dropping OMX message - we're in ERROR state."); - return; + if (msg.type == omx_message::EVENT) { + ALOGW("Dropping OMX message - we're in ERROR state."); + return; + } } switch (msg.type) { |