diff options
author | Gloria Wang <gwang@google.com> | 2011-02-24 16:40:57 -0800 |
---|---|---|
committer | Gloria Wang <gwang@google.com> | 2011-03-10 16:20:48 -0800 |
commit | b5ce361d19e69fe156f7188c9ee0f4734b259874 (patch) | |
tree | 1536e63d3394cbbd5c2e8bc5cde6affb2b173850 /media/libstagefright/FileSource.cpp | |
parent | 609ce04d29780c430ff7e17511fc073a664c02d5 (diff) | |
download | frameworks_av-b5ce361d19e69fe156f7188c9ee0f4734b259874.zip frameworks_av-b5ce361d19e69fe156f7188c9ee0f4734b259874.tar.gz frameworks_av-b5ce361d19e69fe156f7188c9ee0f4734b259874.tar.bz2 |
Fix for bug 3477330
This patch fixs a crash bug caused by using a NULL DecryptHandle pointer.
Fix by using sp<DecryptHandle> instead.
Change-Id: Icbd59858385e8256125a615a3c82656b25319d44
Diffstat (limited to 'media/libstagefright/FileSource.cpp')
-rw-r--r-- | media/libstagefright/FileSource.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/media/libstagefright/FileSource.cpp b/media/libstagefright/FileSource.cpp index 02a78c9..f2f3500 100644 --- a/media/libstagefright/FileSource.cpp +++ b/media/libstagefright/FileSource.cpp @@ -125,7 +125,7 @@ status_t FileSource::getSize(off64_t *size) { return OK; } -DecryptHandle* FileSource::DrmInitialization() { +sp<DecryptHandle> FileSource::DrmInitialization() { if (mDrmManagerClient == NULL) { mDrmManagerClient = new DrmManagerClient(); } @@ -147,8 +147,8 @@ DecryptHandle* FileSource::DrmInitialization() { return mDecryptHandle; } -void FileSource::getDrmInfo(DecryptHandle **handle, DrmManagerClient **client) { - *handle = mDecryptHandle; +void FileSource::getDrmInfo(sp<DecryptHandle> &handle, DrmManagerClient **client) { + handle = mDecryptHandle; *client = mDrmManagerClient; } |