[m2vd_parser]: Fix the frame be output repeatly issue

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I720d2934982084be105ca70cd4ed104d34b8fb0a
This commit is contained in:
Yandong Lin
2021-02-07 20:25:22 +08:00
committed by Herman Chen
parent 3fd6381af7
commit 4e240f0bcd

View File

@@ -1222,10 +1222,12 @@ static MPP_RET m2v_update_ref_frame(M2VDParserContext *p)
M2VDFrameHead *tmpHD = NULL; M2VDFrameHead *tmpHD = NULL;
p->ref_frame_cnt++; p->ref_frame_cnt++;
if (p->frame_ref0->slot_index < 0x7f) { if (p->frame_ref0->slot_index < 0x7f) {
if (p->frame_ref0->flags) {
mpp_buf_slot_set_flag(p->frame_slots, p->frame_ref0->slot_index, SLOT_QUEUE_USE); mpp_buf_slot_set_flag(p->frame_slots, p->frame_ref0->slot_index, SLOT_QUEUE_USE);
mpp_buf_slot_enqueue(p->frame_slots, p->frame_ref0->slot_index, QUEUE_DISPLAY); mpp_buf_slot_enqueue(p->frame_slots, p->frame_ref0->slot_index, QUEUE_DISPLAY);
p->frame_ref0->flags = 0; p->frame_ref0->flags = 0;
} }
}
if (p->frame_ref1->slot_index < 0x7f) { if (p->frame_ref1->slot_index < 0x7f) {
mpp_buf_slot_clr_flag(p->frame_slots, p->frame_ref1->slot_index, SLOT_CODEC_USE); mpp_buf_slot_clr_flag(p->frame_slots, p->frame_ref1->slot_index, SLOT_CODEC_USE);
p->frame_ref1->slot_index = 0xff; p->frame_ref1->slot_index = 0xff;