mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-06 01:26:49 +08:00
[mpp_dec]:fixed destroy lock
[vpu_mem]: add return fail when mallocliner buffer fail git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@529 6e48237b-75ef-9749-8fc9-41990f28c85a
This commit is contained in:
@@ -555,8 +555,10 @@ void *mpp_dec_parser_thread(void *data)
|
||||
}
|
||||
|
||||
parser->lock();
|
||||
if (check_task_wait(dec, &task))
|
||||
parser->wait();
|
||||
if(MPP_THREAD_RUNNING == parser->get_status()){
|
||||
if (check_task_wait(dec, &task))
|
||||
parser->wait();
|
||||
}
|
||||
parser->unlock();
|
||||
|
||||
|
||||
@@ -604,8 +606,10 @@ void *mpp_dec_hal_thread(void *data)
|
||||
* hal thread wait for dxva interface intput firt
|
||||
*/
|
||||
hal->lock();
|
||||
if (hal_task_get_hnd(tasks, TASK_PROCESSING, &task))
|
||||
hal->wait();
|
||||
if(MPP_THREAD_RUNNING == hal->get_status()){
|
||||
if (hal_task_get_hnd(tasks, TASK_PROCESSING, &task))
|
||||
hal->wait();
|
||||
}
|
||||
hal->unlock();
|
||||
|
||||
if (task) {
|
||||
|
@@ -189,8 +189,12 @@ RK_S32 VPUMemJudgeIommu()
|
||||
|
||||
RK_S32 VPUMallocLinear(VPUMemLinear_t *p, RK_U32 size)
|
||||
{
|
||||
int ret = 0;
|
||||
MppBuffer buffer = NULL;
|
||||
mpp_buffer_get(NULL, &buffer, size);
|
||||
ret = mpp_buffer_get(NULL, &buffer, size);
|
||||
if(ret != MPP_OK){
|
||||
return -1;
|
||||
}
|
||||
p->phy_addr = (RK_U32)mpp_buffer_get_fd(buffer);
|
||||
p->vir_addr = (RK_U32*)mpp_buffer_get_ptr(buffer);
|
||||
p->size = size;
|
||||
|
@@ -62,9 +62,10 @@ void MppThread::start()
|
||||
void MppThread::stop()
|
||||
{
|
||||
if (MPP_THREAD_UNINITED != mStatus) {
|
||||
lock();
|
||||
mStatus = MPP_THREAD_STOPPING;
|
||||
signal();
|
||||
|
||||
unlock();
|
||||
void *dummy;
|
||||
pthread_join(mThread, &dummy);
|
||||
thread_dbg(MPP_THREAD_DBG_FUNCTION, "mThread %p mContext %p destroy success\n",
|
||||
|
Reference in New Issue
Block a user