diff --git a/mpp/codec/mpp_dec.cpp b/mpp/codec/mpp_dec.cpp index 849becf2..3622d4e8 100644 --- a/mpp/codec/mpp_dec.cpp +++ b/mpp/codec/mpp_dec.cpp @@ -298,10 +298,8 @@ static MPP_RET try_proc_dec_task(Mpp *mpp, DecTask *task) while (MPP_OK == mpp_buf_slot_dequeue(frame_slots, &index, QUEUE_DISPLAY)) { MppFrame frame = NULL; - RK_U32 discard; mpp_buf_slot_get_prop(frame_slots, index, SLOT_FRAME, &frame); - discard = mpp_frame_get_discard(frame); - if (!dec->reset_flag && !discard) { + if (!dec->reset_flag) { mpp_put_frame(mpp, frame); //mpp_log("discard=%d \n",0); } else { @@ -682,10 +680,8 @@ void *mpp_dec_hal_thread(void *data) RK_S32 index; while (MPP_OK == mpp_buf_slot_dequeue(frame_slots, &index, QUEUE_DISPLAY)) { MppFrame frame = NULL; - RK_U32 discard; mpp_buf_slot_get_prop(frame_slots, index, SLOT_FRAME, &frame); - discard = mpp_frame_get_discard(frame); - if (!dec->reset_flag && !discard) { + if (!dec->reset_flag) { mpp_put_frame(mpp, frame); } else { mpp_frame_deinit(&frame); diff --git a/mpp/legacy/vpu_api_legacy.cpp b/mpp/legacy/vpu_api_legacy.cpp index 35ee4d7e..d68f3d77 100644 --- a/mpp/legacy/vpu_api_legacy.cpp +++ b/mpp/legacy/vpu_api_legacy.cpp @@ -144,11 +144,12 @@ RK_S32 VpuApi:: decode_getoutframe(DecoderOut_t *aDecOut) vframe->DisplayHeight = mpp_frame_get_height(mframe); vframe->FrameWidth = mpp_frame_get_hor_stride(mframe); vframe->FrameHeight = mpp_frame_get_ver_stride(mframe); - vframe->ErrorInfo = mpp_frame_get_errinfo(mframe); + vframe->ErrorInfo = mpp_frame_get_errinfo(mframe) | mpp_frame_get_discard(mframe); //mpp_err("vframe->ErrorInfo = %08x \n", vframe->ErrorInfo); pts = mpp_frame_get_pts(mframe); aDecOut->timeUs = pts; - //mpp_err("get one frame timeUs %lld, errinfo=%08x",aDecOut->timeUs, vframe->ErrorInfo); + //mpp_err("get one frame timeUs %lld, poc=%d, errinfo=%d, discard=%d",aDecOut->timeUs, + // mpp_frame_get_poc(mframe), mpp_frame_get_errinfo(mframe), mpp_frame_get_discard(mframe)); vframe->ShowTime.TimeHigh = (RK_U32)(pts >> 32); vframe->ShowTime.TimeLow = (RK_U32)pts; buf = mpp_frame_get_buffer(mframe);