Use pread() to get the decrypted data for container based DRM file.

For bug 4392094.

Change-Id: Icc64a26c5b413313cc35dcd02d60484dc8245dfb
This commit is contained in:
Gloria Wang
2011-05-20 10:15:21 -07:00
parent b4788fdbfd
commit a6f1104b9d

View File

@ -383,6 +383,13 @@ ssize_t NuHTTPDataSource::readAt(off64_t offset, void *data, size_t size) {
Mutex::Autolock autoLock(mLock); Mutex::Autolock autoLock(mLock);
// if it's a DRM container based streaming, call pread() of the DRM plugin
// to get the decrypted data
if (mDecryptHandle != NULL && DecryptApiType::CONTAINER_BASED
== mDecryptHandle->decryptApiType) {
return mDrmManagerClient->pread(mDecryptHandle, data, size, offset);
}
if (offset != mOffset) { if (offset != mOffset) {
String8 host = mHost; String8 host = mHost;
String8 path = mPath; String8 path = mPath;