summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/NuHTTPDataSource.cpp
diff options
context:
space:
mode:
authorGloria Wang <gwang@google.com>2011-02-24 16:40:57 -0800
committerGloria Wang <gwang@google.com>2011-03-10 16:20:48 -0800
commitae7752798a98fc81ff5e6ae69dde2137692106be (patch)
treeef629db3ccd8104811cb9b7c4b837d3d5b7fdb18 /media/libstagefright/NuHTTPDataSource.cpp
parent7a9794e402ee961abbc149858f34848dd653ac7e (diff)
downloadframeworks_base-ae7752798a98fc81ff5e6ae69dde2137692106be.zip
frameworks_base-ae7752798a98fc81ff5e6ae69dde2137692106be.tar.gz
frameworks_base-ae7752798a98fc81ff5e6ae69dde2137692106be.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/NuHTTPDataSource.cpp')
-rw-r--r--media/libstagefright/NuHTTPDataSource.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/media/libstagefright/NuHTTPDataSource.cpp b/media/libstagefright/NuHTTPDataSource.cpp
index b24343f..73daf12 100644
--- a/media/libstagefright/NuHTTPDataSource.cpp
+++ b/media/libstagefright/NuHTTPDataSource.cpp
@@ -530,7 +530,7 @@ void NuHTTPDataSource::addBandwidthMeasurement_l(
}
}
-DecryptHandle* NuHTTPDataSource::DrmInitialization() {
+sp<DecryptHandle> NuHTTPDataSource::DrmInitialization() {
if (mDrmManagerClient == NULL) {
mDrmManagerClient = new DrmManagerClient();
}
@@ -554,8 +554,8 @@ DecryptHandle* NuHTTPDataSource::DrmInitialization() {
return mDecryptHandle;
}
-void NuHTTPDataSource::getDrmInfo(DecryptHandle **handle, DrmManagerClient **client) {
- *handle = mDecryptHandle;
+void NuHTTPDataSource::getDrmInfo(sp<DecryptHandle> &handle, DrmManagerClient **client) {
+ handle = mDecryptHandle;
*client = mDrmManagerClient;
}