Fix for bug 3477330

This patch fixs a crash bug caused by using a NULL DecryptHandle pointer in the DRM Framework.
Fix by using sp<DecryptHandle> instead.

Change-Id: I1355d4719857ab64ad6cd12803fcf19e45bb50a0
This commit is contained in:
Gloria Wang
2011-02-25 09:47:52 -08:00
parent cf1d556195
commit 14761c80a9
3 changed files with 16 additions and 3 deletions

View File

@@ -19,6 +19,7 @@
#include "WVMMediaSource.h"
#include "WVMFileSource.h"
#include "WVMExtractorImpl.h"
#include "media/stagefright/MediaErrors.h"
#include "media/stagefright/MediaDefs.h"
#include "media/stagefright/MediaDebug.h"
@@ -274,8 +275,10 @@ WVMMediaSource::~WVMMediaSource()
}
if (mESSelector == WV_EsSelector_Video) {
if (mSession != NULL)
if (mSession != NULL) {
WV_Teardown(mSession);
}
WVMExtractorImpl::cleanup();
}
}