libwvdrmengine: Fix double ownership of WVDrmFactory

Using std::make_shared with ndk::SharedRefBase objects causes memory
errors.

Bug: 226379467
Test: TH
Change-Id: I3649ace96067e68cfc0ac998c836d9a8bd48bd11
This commit is contained in:
Frederick Mayle
2022-03-23 17:58:43 +00:00
parent dddd1142de
commit 3112fd5505

View File

@@ -12,7 +12,7 @@ namespace drm {
namespace widevine {
std::shared_ptr<WVDrmFactory> createDrmFactory() {
return std::make_shared<WVDrmFactory>();
return ndk::SharedRefBase::make<WVDrmFactory>();
}
} // namespace widevine