mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-07 01:52:46 +08:00
[avs2d]: Fix PTS out of order problem
It is wrong to using PTS of the next packet as PTS of current paring frame. Change-Id: I858d4bd2831e63eefc8815be3cabe460444528bd Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
This commit is contained in:

committed by
Herman Chen

parent
b04033f8c2
commit
669bf366ec
@@ -314,7 +314,8 @@ static MPP_RET output_display_frame(Avs2dCtx_t *p_dec, Avs2dFrame_t *p)
|
|||||||
p_dec->frm_mgr.output_poi = p->poi;
|
p_dec->frm_mgr.output_poi = p->poi;
|
||||||
mpp_buf_slot_set_flag(p_dec->frame_slots, p->slot_idx, SLOT_QUEUE_USE);
|
mpp_buf_slot_set_flag(p_dec->frame_slots, p->slot_idx, SLOT_QUEUE_USE);
|
||||||
mpp_buf_slot_enqueue(p_dec->frame_slots, p->slot_idx, QUEUE_DISPLAY);
|
mpp_buf_slot_enqueue(p_dec->frame_slots, p->slot_idx, QUEUE_DISPLAY);
|
||||||
avs2d_dbg_dpb("output display frame poi %d slot_idx %d", p->poi, p->slot_idx);
|
avs2d_dbg_dpb("output display frame poi %d slot_idx %d, pts %lld", p->poi, p->slot_idx,
|
||||||
|
mpp_frame_get_pts(p->frame));
|
||||||
}
|
}
|
||||||
|
|
||||||
avs2d_dbg_dpb("Out. ret = %d", ret);
|
avs2d_dbg_dpb("Out. ret = %d", ret);
|
||||||
|
@@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
#define AVS2_IS_SLICE_START_CODE(x) ((x) >= AVS2_SLICE_MIN_START_CODE && (x) <= AVS2_SLICE_MAX_START_CODE)
|
#define AVS2_IS_SLICE_START_CODE(x) ((x) >= AVS2_SLICE_MIN_START_CODE && (x) <= AVS2_SLICE_MAX_START_CODE)
|
||||||
#define AVS2_IS_HEADER(x) ((x) >= AVS2_VIDEO_SEQUENCE_START_CODE && (x) <= AVS2_VIDEO_EDIT_CODE)
|
#define AVS2_IS_HEADER(x) ((x) >= AVS2_VIDEO_SEQUENCE_START_CODE && (x) <= AVS2_VIDEO_EDIT_CODE)
|
||||||
#define AVS2_IS_PIC_START_CODE(x) ((x) == AVS2_I_PICUTRE_START_CODE || (x) == AVS2_PB_PICTURE_START_CODE)
|
#define AVS2_IS_PIC_START_CODE(x) ((x) == AVS2_I_PICTURE_START_CODE || (x) == AVS2_PB_PICTURE_START_CODE)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Find start code 00 00 01 xx
|
* @brief Find start code 00 00 01 xx
|
||||||
@@ -602,7 +602,8 @@ MPP_RET avs2d_parse_prepare_fast(Avs2dCtx_t *p_dec, MppPacket *pkt, HalDecTask *
|
|||||||
p_curdata = p_end - remain + 1;
|
p_curdata = p_end - remain + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p_dec->new_frame_flag || (p_dec->p_nals[p_dec->nal_cnt - 1].eof == 1)) {
|
if (p_dec->new_frame_flag || (p_dec->p_nals[p_dec->nal_cnt - 1].eof == 1)
|
||||||
|
|| p_curdata >= p_end) {
|
||||||
task->valid = 1;
|
task->valid = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user