Loading media/codec2/hidl/1.0/utils/InputSurfaceConnection.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -201,6 +201,8 @@ struct InputSurfaceConnection::Impl : public ComponentWrapper { c2_status_t err = mAllocator->priorGraphicAllocation(handle, &alloc); mAllocatorMutex.unlock(); if (err != OK) { native_handle_close(handle); native_handle_delete(handle); return UNKNOWN_ERROR; } std::shared_ptr<C2GraphicBlock> block = Loading media/codec2/sfplugin/C2OMXNode.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -421,6 +421,8 @@ status_t C2OMXNode::emptyBuffer( if (err != OK) { (void)fd0.release(); (void)fd1.release(); native_handle_close(handle); native_handle_delete(handle); return UNKNOWN_ERROR; } block = _C2BlockFactory::CreateGraphicBlock(alloc); Loading media/codec2/sfplugin/Codec2Buffer.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -713,6 +713,8 @@ std::shared_ptr<C2Buffer> GraphicMetadataBuffer::asC2Buffer() { c2_status_t err = mAlloc->priorGraphicAllocation(handle, &alloc); if (err != C2_OK) { ALOGD("Failed to wrap VideoNativeMetadata into C2GraphicAllocation"); native_handle_close(handle); native_handle_delete(handle); return nullptr; } std::shared_ptr<C2GraphicBlock> block = _C2BlockFactory::CreateGraphicBlock(alloc); Loading media/codec2/vndk/include/C2AllocatorGralloc.h +2 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,8 @@ native_handle_t *UnwrapNativeCodec2GrallocHandle(const C2Handle *const handle); * Wrap the gralloc handle and metadata into Codec2 handle recognized by * C2AllocatorGralloc. * * @return a new NON-OWNING C2Handle that must be deleted using native_handle_delete. * @return a new NON-OWNING C2Handle that must be closed and deleted using native_handle_close and * native_handle_delete. */ C2Handle *WrapNativeCodec2GrallocHandle( const native_handle_t *const handle, Loading media/codec2/vndk/platform/C2BqBuffer.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -364,6 +364,8 @@ private: std::shared_ptr<C2GraphicAllocation> alloc; c2_status_t err = mAllocator->priorGraphicAllocation(c2Handle, &alloc); if (err != C2_OK) { native_handle_close(c2Handle); native_handle_delete(c2Handle); return err; } std::shared_ptr<C2BufferQueueBlockPoolData> poolData = Loading Loading
media/codec2/hidl/1.0/utils/InputSurfaceConnection.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -201,6 +201,8 @@ struct InputSurfaceConnection::Impl : public ComponentWrapper { c2_status_t err = mAllocator->priorGraphicAllocation(handle, &alloc); mAllocatorMutex.unlock(); if (err != OK) { native_handle_close(handle); native_handle_delete(handle); return UNKNOWN_ERROR; } std::shared_ptr<C2GraphicBlock> block = Loading
media/codec2/sfplugin/C2OMXNode.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -421,6 +421,8 @@ status_t C2OMXNode::emptyBuffer( if (err != OK) { (void)fd0.release(); (void)fd1.release(); native_handle_close(handle); native_handle_delete(handle); return UNKNOWN_ERROR; } block = _C2BlockFactory::CreateGraphicBlock(alloc); Loading
media/codec2/sfplugin/Codec2Buffer.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -713,6 +713,8 @@ std::shared_ptr<C2Buffer> GraphicMetadataBuffer::asC2Buffer() { c2_status_t err = mAlloc->priorGraphicAllocation(handle, &alloc); if (err != C2_OK) { ALOGD("Failed to wrap VideoNativeMetadata into C2GraphicAllocation"); native_handle_close(handle); native_handle_delete(handle); return nullptr; } std::shared_ptr<C2GraphicBlock> block = _C2BlockFactory::CreateGraphicBlock(alloc); Loading
media/codec2/vndk/include/C2AllocatorGralloc.h +2 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,8 @@ native_handle_t *UnwrapNativeCodec2GrallocHandle(const C2Handle *const handle); * Wrap the gralloc handle and metadata into Codec2 handle recognized by * C2AllocatorGralloc. * * @return a new NON-OWNING C2Handle that must be deleted using native_handle_delete. * @return a new NON-OWNING C2Handle that must be closed and deleted using native_handle_close and * native_handle_delete. */ C2Handle *WrapNativeCodec2GrallocHandle( const native_handle_t *const handle, Loading
media/codec2/vndk/platform/C2BqBuffer.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -364,6 +364,8 @@ private: std::shared_ptr<C2GraphicAllocation> alloc; c2_status_t err = mAllocator->priorGraphicAllocation(c2Handle, &alloc); if (err != C2_OK) { native_handle_close(c2Handle); native_handle_delete(c2Handle); return err; } std::shared_ptr<C2BufferQueueBlockPoolData> poolData = Loading