mirror of
https://github.com/nyanmisaka/mpp.git
synced 2026-01-23 23:50:38 +01:00
fix[avs2d]: fix parser segment fault
If packet is splited outside of mpp and video_sequence_start_code is not guaranteed, there will not be valid NALS. Thus segment fault will happen. Change-Id: Idb5e51772384c6663260d382b94845a8e1ac7c35 Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
This commit is contained in:
parent
3b338216a4
commit
acd5537923
1 changed files with 1 additions and 1 deletions
|
|
@ -607,7 +607,7 @@ MPP_RET avs2d_parse_prepare_fast(Avs2dCtx_t *p_dec, MppPacket *pkt, HalDecTask *
|
|||
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->nal_cnt && (p_dec->p_nals[p_dec->nal_cnt - 1].eof == 1))
|
||||
|| p_curdata >= p_end) {
|
||||
task->valid = 1;
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue