Loading media/codec2/vndk/C2Store.cpp +12 −4 Original line number Original line Diff line number Diff line Loading @@ -301,13 +301,21 @@ void C2PlatformAllocatorStoreImpl::setComponentStore(std::shared_ptr<C2Component std::lock_guard<std::mutex> lock(_mComponentStoreReadLock); std::lock_guard<std::mutex> lock(_mComponentStoreReadLock); _mComponentStore = store; _mComponentStore = store; } } std::shared_ptr<C2AllocatorIon> allocator; std::shared_ptr<C2AllocatorIon> ionAllocator; { { std::lock_guard<std::mutex> lock(gIonAllocatorMutex); std::lock_guard<std::mutex> lock(gIonAllocatorMutex); allocator = gIonAllocator.lock(); ionAllocator = gIonAllocator.lock(); } } if (allocator) { if (ionAllocator) { UseComponentStoreForIonAllocator(allocator, store); UseComponentStoreForIonAllocator(ionAllocator, store); } std::shared_ptr<C2DmaBufAllocator> dmaAllocator; { std::lock_guard<std::mutex> lock(gDmaBufAllocatorMutex); dmaAllocator = gDmaBufAllocator.lock(); } if (dmaAllocator) { UseComponentStoreForDmaBufAllocator(dmaAllocator, store); } } } } Loading Loading
media/codec2/vndk/C2Store.cpp +12 −4 Original line number Original line Diff line number Diff line Loading @@ -301,13 +301,21 @@ void C2PlatformAllocatorStoreImpl::setComponentStore(std::shared_ptr<C2Component std::lock_guard<std::mutex> lock(_mComponentStoreReadLock); std::lock_guard<std::mutex> lock(_mComponentStoreReadLock); _mComponentStore = store; _mComponentStore = store; } } std::shared_ptr<C2AllocatorIon> allocator; std::shared_ptr<C2AllocatorIon> ionAllocator; { { std::lock_guard<std::mutex> lock(gIonAllocatorMutex); std::lock_guard<std::mutex> lock(gIonAllocatorMutex); allocator = gIonAllocator.lock(); ionAllocator = gIonAllocator.lock(); } } if (allocator) { if (ionAllocator) { UseComponentStoreForIonAllocator(allocator, store); UseComponentStoreForIonAllocator(ionAllocator, store); } std::shared_ptr<C2DmaBufAllocator> dmaAllocator; { std::lock_guard<std::mutex> lock(gDmaBufAllocatorMutex); dmaAllocator = gDmaBufAllocator.lock(); } if (dmaAllocator) { UseComponentStoreForDmaBufAllocator(dmaAllocator, store); } } } } Loading