decoder: fixed the issure of losing frames in playback

PD#151174: add detection of eos data to prevent err in play state

The play ready state requires 3 conditions:
1. input object is valid
2. available with chunk data
3. no eos data received

Change-Id: Idee816458f2da165fce52a74c9d308a32b116d15
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
This commit is contained in:
Nanxin Qin
2017-09-19 17:37:55 +08:00
committed by Dongjin Kim
parent 33a11f4851
commit 6972026c5a

View File

@@ -1693,10 +1693,12 @@ static inline bool vdec_ready_to_run(struct vdec_s *vdec)
if ((vdec->slave || vdec->master) &&
(vdec->sched == 0))
return false;
/* check frame based input underrun */
if (input && input_frame_based(input) &&
(!vdec_input_next_chunk(input)))
if (input && !input->eos && input_frame_based(input)
&& (!vdec_input_next_chunk(input)))
return false;
/* check streaming prepare level threshold if not EOS */
if (input && input_stream_based(input) && !input->eos) {
u32 rp, wp, level;