fix[h265d]: fix infochange loss when two sps continuous

The sps buf is managed by mpp_mem_pool. When two sps appear
consecutively, the second ptr of sps is the same as the old sps.
So when updating the sps to pps,it is not enough to judge the ptr sps.

Change-Id: Ieb7cf1c374dd72abae6f0c899bc9f2ee9849072e
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
This commit is contained in:
Yandong Lin 2024-09-04 11:09:04 +08:00
parent be5247fe75
commit 44a9afe384

View File

@ -750,7 +750,7 @@ static RK_S32 hls_slice_header(HEVCContext *s)
}
s->pps = (HEVCPPS*)s->pps_list[sh->pps_id];
if (s->sps != (HEVCSPS*)s->sps_list[s->pps->sps_id]) {
if (s->ps_need_upate || s->sps != (HEVCSPS*)s->sps_list[s->pps->sps_id]) {
s->sps = (HEVCSPS*)s->sps_list[s->pps->sps_id];
mpp_hevc_clear_refs(s);
@ -2029,6 +2029,7 @@ MPP_RET h265d_parse(void *ctx, HalDecTask *task)
s->task->syntax.data = s->hal_pic_private;
s->task->syntax.number = 1;
s->task->valid = 1;
s->ps_need_upate = 0;
}
if (s->eos) {
h265d_flush(ctx);