Merge "[WVDRM] Fix effectively-unlimited memory usage" into jb-mr1-dev

This commit is contained in:
John "Juce" Bruce
2012-10-04 11:37:32 -07:00
committed by Android (Google) Code Review

View File

@@ -640,10 +640,12 @@ void WVMExtractorImpl::setUID(uid_t uid)
size_t WVMExtractorImpl::getStreamCacheSize() const
{
char value[PROPERTY_VALUE_MAX];
snprintf(value, sizeof(value), "%d", kDefaultStreamCacheSize);
property_get("ro.com.widevine.cachesize", value, NULL);
return atol(value);
if (property_get("ro.com.widevine.cachesize", value, NULL) > 0) {
return atol(value);
} else {
return kDefaultStreamCacheSize;
}
}
status_t WVMExtractorImpl::getError() {