Loading media/codec2/sfplugin/C2OMXNode.cpp +5 −1 Original line number Diff line number Diff line Loading @@ -225,14 +225,18 @@ status_t C2OMXNode::emptyBuffer( if (omxBuf.mBufferType == OMXBuffer::kBufferTypeANWBuffer && omxBuf.mGraphicBuffer != nullptr) { std::shared_ptr<C2GraphicAllocation> alloc; native_handle_t *clonedHandle = native_handle_clone(omxBuf.mGraphicBuffer->handle); handle = WrapNativeCodec2GrallocHandle( native_handle_clone(omxBuf.mGraphicBuffer->handle), clonedHandle, omxBuf.mGraphicBuffer->width, omxBuf.mGraphicBuffer->height, omxBuf.mGraphicBuffer->format, omxBuf.mGraphicBuffer->usage, omxBuf.mGraphicBuffer->stride); c2_status_t err = mAllocator->priorGraphicAllocation(handle, &alloc); if (clonedHandle) { native_handle_delete(clonedHandle); } if (err != OK) { return UNKNOWN_ERROR; } Loading media/codec2/vndk/C2AllocatorGralloc.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -316,6 +316,11 @@ C2AllocationGralloc::~C2AllocationGralloc() { native_handle_delete( const_cast<native_handle_t *>(reinterpret_cast<const native_handle_t *>(mHandle))); } if (mLockedHandle) { native_handle_delete( const_cast<native_handle_t *>( reinterpret_cast<const native_handle_t *>(mLockedHandle))); } } c2_status_t C2AllocationGralloc::map( Loading Loading
media/codec2/sfplugin/C2OMXNode.cpp +5 −1 Original line number Diff line number Diff line Loading @@ -225,14 +225,18 @@ status_t C2OMXNode::emptyBuffer( if (omxBuf.mBufferType == OMXBuffer::kBufferTypeANWBuffer && omxBuf.mGraphicBuffer != nullptr) { std::shared_ptr<C2GraphicAllocation> alloc; native_handle_t *clonedHandle = native_handle_clone(omxBuf.mGraphicBuffer->handle); handle = WrapNativeCodec2GrallocHandle( native_handle_clone(omxBuf.mGraphicBuffer->handle), clonedHandle, omxBuf.mGraphicBuffer->width, omxBuf.mGraphicBuffer->height, omxBuf.mGraphicBuffer->format, omxBuf.mGraphicBuffer->usage, omxBuf.mGraphicBuffer->stride); c2_status_t err = mAllocator->priorGraphicAllocation(handle, &alloc); if (clonedHandle) { native_handle_delete(clonedHandle); } if (err != OK) { return UNKNOWN_ERROR; } Loading
media/codec2/vndk/C2AllocatorGralloc.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -316,6 +316,11 @@ C2AllocationGralloc::~C2AllocationGralloc() { native_handle_delete( const_cast<native_handle_t *>(reinterpret_cast<const native_handle_t *>(mHandle))); } if (mLockedHandle) { native_handle_delete( const_cast<native_handle_t *>( reinterpret_cast<const native_handle_t *>(mLockedHandle))); } } c2_status_t C2AllocationGralloc::map( Loading