diff --git a/drivers/amlogic/media_modules/frame_provider/decoder/utils/vdec.c b/drivers/amlogic/media_modules/frame_provider/decoder/utils/vdec.c index a1be82c750f6..47fe09e99082 100644 --- a/drivers/amlogic/media_modules/frame_provider/decoder/utils/vdec.c +++ b/drivers/amlogic/media_modules/frame_provider/decoder/utils/vdec.c @@ -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;