[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:
ChenSiyong
2016-01-15 09:27:07 +00:00
parent 0b48769422
commit e4d3871dbf
3 changed files with 15 additions and 6 deletions

View File

@@ -555,8 +555,10 @@ void *mpp_dec_parser_thread(void *data)
}
parser->lock();
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(MPP_THREAD_RUNNING == hal->get_status()){
if (hal_task_get_hnd(tasks, TASK_PROCESSING, &task))
hal->wait();
}
hal->unlock();
if (task) {

View File

@@ -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;

View File

@@ -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",