diff options
author | James Dong <jdong@google.com> | 2011-01-10 08:55:02 -0800 |
---|---|---|
committer | James Dong <jdong@google.com> | 2011-01-10 10:27:02 -0800 |
commit | 6328185b6cc632f85ff640f6e854ab33815ae97f (patch) | |
tree | 291f9958559183fd6741cc9532549e076dce3420 /include | |
parent | 9aac2e2b9541c424ca02483631b08949f0e90c8c (diff) | |
download | frameworks_base-6328185b6cc632f85ff640f6e854ab33815ae97f.zip frameworks_base-6328185b6cc632f85ff640f6e854ab33815ae97f.tar.gz frameworks_base-6328185b6cc632f85ff640f6e854ab33815ae97f.tar.bz2 |
Avoid deadlock in OMX::freeNode by making sure OMXCodecObserver does not hold the last reference of OMXCodec object - do not merge
cherry-picked from: I4c79b66a900c527e3ae6a833f76d5da1b75c5a89
bug - 3336424
Change-Id: I2d8ecb79a5422342988c195c012c9e6327ac457a
Diffstat (limited to 'include')
-rw-r--r-- | include/media/stagefright/OMXCodec.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/include/media/stagefright/OMXCodec.h b/include/media/stagefright/OMXCodec.h index fed6761..8274dfb 100644 --- a/include/media/stagefright/OMXCodec.h +++ b/include/media/stagefright/OMXCodec.h @@ -60,8 +60,6 @@ struct OMXCodec : public MediaSource, virtual status_t pause(); - void on_message(const omx_message &msg); - // from MediaBufferObserver virtual void signalBufferReturned(MediaBuffer *buffer); @@ -69,6 +67,13 @@ protected: virtual ~OMXCodec(); private: + + // Make sure mLock is accessible to OMXCodecObserver + friend class OMXCodecObserver; + + // Call this with mLock hold + void on_message(const omx_message &msg); + enum State { DEAD, LOADED, |