fix[h264d]: Fix extra data lost issue

The extra data(sps/pps) will be lost when the following flow occur:
push extra data -> reset -> push idr data.

Change-Id: I5f371291d5e7bcc27aad18ce6ae180b00fd76bd7
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
This commit is contained in:
Yandong Lin
2024-12-30 11:43:56 +08:00
parent ab79656052
commit e0286d07b3

View File

@@ -435,7 +435,8 @@ MPP_RET h264d_reset(void *decoder)
p_strm->prefixdata = 0xffffffff;
p_strm->nalu_offset = 0;
p_strm->nalu_len = 0;
p_strm->head_offset = 0;
if (p_strm->nalu_type != H264_NALU_TYPE_PPS && p_strm->nalu_type != H264_NALU_TYPE_SPS)
p_strm->head_offset = 0;
p_strm->tmp_offset = 0;
p_strm->first_mb_in_slice = 0;
p_strm->endcode_found = 0;