mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-04 08:46:24 +08:00
[alloctor]: add flags for alloctor
Each of the different alloctor has different alloctor modes, such as allocating physical continuous memory, secure memory, etc. Change-Id: Ib032689f0cfd36b494843dcc176a22c6c9587b6a Signed-off-by: Rimon Xu <rimon.xu@rock-chips.com>
This commit is contained in:
@@ -27,7 +27,7 @@ typedef struct {
|
||||
size_t alignment;
|
||||
} allocator_ctx;
|
||||
|
||||
static MPP_RET allocator_ext_dma_open(void **ctx, size_t alignment)
|
||||
static MPP_RET allocator_ext_dma_open(void **ctx, MppAllocatorCfg *cfg)
|
||||
{
|
||||
MPP_RET ret = MPP_OK;
|
||||
allocator_ctx *p = NULL;
|
||||
@@ -42,7 +42,7 @@ static MPP_RET allocator_ext_dma_open(void **ctx, size_t alignment)
|
||||
mpp_err_f("failed to allocate context\n");
|
||||
ret = MPP_ERR_MALLOC;
|
||||
} else {
|
||||
p->alignment = alignment;
|
||||
p->alignment = cfg->alignment;
|
||||
}
|
||||
|
||||
*ctx = p;
|
||||
|
Reference in New Issue
Block a user