mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-05 17:16:50 +08:00
[legacy]: fix thumbnail buffer group multiple release issue
git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@895 6e48237b-75ef-9749-8fc9-41990f28c85a
This commit is contained in:
@@ -138,10 +138,6 @@ int create_vpu_memory_pool_allocator(vpu_display_mem_pool **ipool, int num, int
|
||||
if (NULL == p_mempool) {
|
||||
return -1;
|
||||
}
|
||||
mpp_buffer_group_get_internal(&p_mempool->group, MPP_BUFFER_TYPE_ION);
|
||||
if (NULL == p_mempool->group) {
|
||||
return -1;
|
||||
}
|
||||
p_mempool->commit_hdl = commit_memory_handle;
|
||||
p_mempool->get_free = get_free_memory_vpumem;
|
||||
p_mempool->put_used = put_used_memory_handle;
|
||||
@@ -163,9 +159,6 @@ void release_vpu_memory_pool_allocator(vpu_display_mem_pool *ipool)
|
||||
if (p_mempool == NULL) {
|
||||
return;
|
||||
}
|
||||
if (NULL != p_mempool->group) {
|
||||
mpp_buffer_group_put(p_mempool->group);
|
||||
}
|
||||
mpp_free(p_mempool);
|
||||
return;
|
||||
}
|
||||
|
@@ -18,9 +18,14 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#if defined(_WIN32)
|
||||
#include "vld.h"
|
||||
#endif
|
||||
#include "mpp_log.h"
|
||||
#include "mpp_env.h"
|
||||
#include "mpp_buffer.h"
|
||||
|
||||
#define MPP_BUFFER_TEST_DEBUG_FLAG (0xf)
|
||||
#define MPP_BUFFER_TEST_SIZE (SZ_1K*4)
|
||||
#define MPP_BUFFER_TEST_COMMIT_COUNT 10
|
||||
#define MPP_BUFFER_TEST_NORMAL_COUNT 10
|
||||
@@ -37,8 +42,12 @@ int main()
|
||||
size_t size = MPP_BUFFER_TEST_SIZE;
|
||||
RK_S32 count = MPP_BUFFER_TEST_COMMIT_COUNT;
|
||||
RK_S32 i;
|
||||
RK_U32 debug = 0;
|
||||
|
||||
mpp_log("mpp_buffer_test start\n");
|
||||
mpp_env_set_u32("mpp_buffer_debug", MPP_BUFFER_TEST_DEBUG_FLAG);
|
||||
mpp_env_get_u32("mpp_buffer_debug", &debug, 0);
|
||||
|
||||
mpp_log("mpp_buffer_test start with debug 0x%x\n", debug);
|
||||
|
||||
memset(commit_ptr, 0, sizeof(commit_ptr));
|
||||
memset(commit_buffer, 0, sizeof(commit_buffer));
|
||||
|
Reference in New Issue
Block a user