From 44a9afe384e2141cab39912dc3aa00b0f5f98e94 Mon Sep 17 00:00:00 2001 From: Yandong Lin Date: Wed, 4 Sep 2024 11:09:04 +0800 Subject: [PATCH] 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 --- mpp/codec/dec/h265/h265d_parser.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mpp/codec/dec/h265/h265d_parser.c b/mpp/codec/dec/h265/h265d_parser.c index d18eb303..e61975c7 100644 --- a/mpp/codec/dec/h265/h265d_parser.c +++ b/mpp/codec/dec/h265/h265d_parser.c @@ -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);