[mpp_enc]: Encoder async IO mode add 10ms timeout

Change-Id: I7477a32080c19bb05c1a9d9d7596925ed9ffbbaa
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
This commit is contained in:
Herman Chen
2022-06-22 09:57:11 +08:00
parent 188dfb5d20
commit cf32c96d42
2 changed files with 2 additions and 1 deletions

View File

@@ -2489,6 +2489,7 @@ static MPP_RET try_get_async_task(MppEncImpl *enc, EncAsyncWait *wait)
if (frm_in->list_size()) { if (frm_in->list_size()) {
frm_in->del_at_head(&frame, sizeof(frame)); frm_in->del_at_head(&frame, sizeof(frame));
frm_in->signal();
mpp->mFrameGetCount++; mpp->mFrameGetCount++;
mpp_assert(frame); mpp_assert(frame);

View File

@@ -679,7 +679,7 @@ MPP_RET Mpp::put_frame_async(MppFrame frame)
return MPP_NOK; return MPP_NOK;
/* NOTE: the max input queue length is 2 */ /* NOTE: the max input queue length is 2 */
if (mFrmIn->list_size() >= 2) { if (mFrmIn->wait_le(10, 1)) {
mFrmIn->unlock(); mFrmIn->unlock();
return MPP_NOK; return MPP_NOK;
} }