diff options
author | Lajos Molnar <lajos@google.com> | 2015-05-13 11:51:18 -0700 |
---|---|---|
committer | Lajos Molnar <lajos@google.com> | 2015-05-13 14:23:57 -0700 |
commit | 0806340688c937e7b78c2d89db3809274130df4e (patch) | |
tree | ee10886944d275f9254286e8e8f36832627f158b /include | |
parent | 777cf6d2788b12bbd68f620cda94a128462a208d (diff) | |
download | frameworks_av-0806340688c937e7b78c2d89db3809274130df4e.zip frameworks_av-0806340688c937e7b78c2d89db3809274130df4e.tar.gz frameworks_av-0806340688c937e7b78c2d89db3809274130df4e.tar.bz2 |
stagefright: prevent more crashes in ACodec
Signal errors if OMX or native window reports an error
Bug: 20439174
Change-Id: Iebeb16f5a29c6819d39568a184b921799a234686
Diffstat (limited to 'include')
-rw-r--r-- | include/media/stagefright/ACodec.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/media/stagefright/ACodec.h b/include/media/stagefright/ACodec.h index b8327a3..07ada35 100644 --- a/include/media/stagefright/ACodec.h +++ b/include/media/stagefright/ACodec.h @@ -147,8 +147,13 @@ private: OWNED_BY_UPSTREAM, OWNED_BY_DOWNSTREAM, OWNED_BY_NATIVE_WINDOW, + UNRECOGNIZED, // not a tracked buffer }; + static inline Status getSafeStatus(BufferInfo *info) { + return info == NULL ? UNRECOGNIZED : info->mStatus; + } + IOMX::buffer_id mBufferID; Status mStatus; unsigned mDequeuedAt; @@ -157,6 +162,9 @@ private: sp<GraphicBuffer> mGraphicBuffer; }; + static const char *_asString(BufferInfo::Status s); + void dumpBuffers(OMX_U32 portIndex); + #if TRACK_BUFFER_TIMING struct BufferStats { int64_t mEmptyBufferTimeUs; |