diff options
author | Shalaj Jain <shalajj@codeaurora.org> | 2015-09-22 14:58:34 -0700 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2015-10-06 03:25:08 -0600 |
commit | 69ef79ce3cc954c8a2dbb7fb7f0fcac80a08b73d (patch) | |
tree | e32a1e340469bbe50994797b240efed22fe63719 /media/libstagefright/MediaCodec.cpp | |
parent | 8f18da70cf611d6a2d066b0a7ef43ccc2a3d968f (diff) | |
download | frameworks_av-69ef79ce3cc954c8a2dbb7fb7f0fcac80a08b73d.zip frameworks_av-69ef79ce3cc954c8a2dbb7fb7f0fcac80a08b73d.tar.gz frameworks_av-69ef79ce3cc954c8a2dbb7fb7f0fcac80a08b73d.tar.bz2 |
stagefright: Stability fixes
Add a null check around MediaCodec release to avoid the warning
from AMessage about target handler being gone.
Add bufferlock in updateBuffer to avoid race condition between
info->mFormat being assigned to mOutputFormat while mOutputFormat
is being updated at the same time.
Change-Id: Ibc5a9a79a840d1c15a99be7c74ded1588edf3918
Diffstat (limited to 'media/libstagefright/MediaCodec.cpp')
-rw-r--r-- | media/libstagefright/MediaCodec.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/media/libstagefright/MediaCodec.cpp b/media/libstagefright/MediaCodec.cpp index b8a6e07..4659d92 100644 --- a/media/libstagefright/MediaCodec.cpp +++ b/media/libstagefright/MediaCodec.cpp @@ -2267,6 +2267,7 @@ size_t MediaCodec::updateBuffers( uint32_t bufferID; CHECK(msg->findInt32("buffer-id", (int32_t*)&bufferID)); + Mutex::Autolock al(mBufferLock); Vector<BufferInfo> *buffers = &mPortBuffers[portIndex]; |