[h265d]: output all frame when reset avoid frame buffer no free

[codec_thread]:add hal lock when put processing task to task list avoid hal thread can't wake up at wait signal 

git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@445 6e48237b-75ef-9749-8fc9-41990f28c85a
This commit is contained in:
ChenSiyong
2015-11-03 01:30:44 +00:00
parent 3e32bcb489
commit f00b75bde4
2 changed files with 8 additions and 0 deletions

View File

@@ -1857,6 +1857,10 @@ MPP_RET h265d_reset(void *ctx)
{
H265dContext_t *h265dctx = (H265dContext_t *)ctx;
HEVCContext *s = (HEVCContext *)h265dctx->priv_data;
RK_S32 ret = 0;
do {
ret = mpp_hevc_output_frame(ctx, 1);
} while (ret);
mpp_hevc_flush_dpb(s);
h265d_split_reset(h265dctx->split_cxt);
s->max_ra = INT_MAX;

View File

@@ -352,7 +352,9 @@ static MPP_RET try_proc_dec_task(Mpp *mpp, DecTask *task)
if (!task->status.info_task_gen_rdy) {
task_dec->flags.info_change = 1;
hal_task_hnd_set_info(task->hnd, &task->info);
mpp->mThreadHal->lock();
hal_task_hnd_set_status(task->hnd, TASK_PROCESSING);
mpp->mThreadHal->unlock();
mpp->mThreadHal->signal();
mpp->mTaskPutCount++;
task->hnd = NULL;
@@ -445,7 +447,9 @@ static MPP_RET try_proc_dec_task(Mpp *mpp, DecTask *task)
* combinate video codec dxva output and buffer information
*/
hal_task_hnd_set_info(task->hnd, &task->info);
mpp->mThreadHal->lock();
hal_task_hnd_set_status(task->hnd, TASK_PROCESSING);
mpp->mThreadHal->unlock();
mpp->mThreadHal->signal();
mpp->mTaskPutCount++;