diff --git a/mpp/codec/dec/h265/h265d_parser.c b/mpp/codec/dec/h265/h265d_parser.c index 3c8bfd18..ebaf67f7 100644 --- a/mpp/codec/dec/h265/h265d_parser.c +++ b/mpp/codec/dec/h265/h265d_parser.c @@ -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; diff --git a/mpp/codec/mpp_dec.cpp b/mpp/codec/mpp_dec.cpp index 387d1f5d..bffe1abe 100644 --- a/mpp/codec/mpp_dec.cpp +++ b/mpp/codec/mpp_dec.cpp @@ -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++;