diff options
author | Glenn Kasten <gkasten@google.com> | 2013-06-13 13:47:02 -0700 |
---|---|---|
committer | Glenn Kasten <gkasten@google.com> | 2013-06-13 14:02:18 -0700 |
commit | e2ffd5b583da9d30d96710b0e8879e90b2b51d30 (patch) | |
tree | 9e03c688b0f8d3c807de2ca4233552eeb756a8cd /include | |
parent | 04411d3ed343added179703837c6c24444acce3b (diff) | |
download | frameworks_av-e2ffd5b583da9d30d96710b0e8879e90b2b51d30.zip frameworks_av-e2ffd5b583da9d30d96710b0e8879e90b2b51d30.tar.gz frameworks_av-e2ffd5b583da9d30d96710b0e8879e90b2b51d30.tar.bz2 |
AudioRecord must be used as sp<> only
Bug: 9423855
Change-Id: I78ba8228c60dff11fb466156bb632c5dda45cdaf
Diffstat (limited to 'include')
-rw-r--r-- | include/media/AudioRecord.h | 4 | ||||
-rw-r--r-- | include/media/stagefright/AudioSource.h | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/include/media/AudioRecord.h b/include/media/AudioRecord.h index 81be803..7aa3c24 100644 --- a/include/media/AudioRecord.h +++ b/include/media/AudioRecord.h @@ -161,7 +161,9 @@ public: /* Terminates the AudioRecord and unregisters it from AudioFlinger. * Also destroys all resources associated with the AudioRecord. */ - ~AudioRecord(); +protected: + virtual ~AudioRecord(); +public: /* Initialize an AudioRecord that was created using the AudioRecord() constructor. * Don't call set() more than once, or after an AudioRecord() constructor that takes parameters. diff --git a/include/media/stagefright/AudioSource.h b/include/media/stagefright/AudioSource.h index 99f3c3b..4c9aaad 100644 --- a/include/media/stagefright/AudioSource.h +++ b/include/media/stagefright/AudioSource.h @@ -73,7 +73,7 @@ private: Condition mFrameAvailableCondition; Condition mFrameEncodingCompletionCondition; - AudioRecord *mRecord; + sp<AudioRecord> mRecord; status_t mInitCheck; bool mStarted; int32_t mSampleRate; |