From 990f44951575853b6ee574f251b61b2bc52c82d5 Mon Sep 17 00:00:00 2001 From: Hongjin Li Date: Fri, 5 Jul 2024 15:02:09 +0800 Subject: [PATCH] fix[h265d_parser]: Fix fmt configuration issue s->h265dctx->pix_fmt is not initialized before configuration, so without recreating mpp, s->h265dctx->pix_fmt can only behave normally in overlay state (ex: yuv->fbc), and abnormal in reduction state (ex: fbc->yuv) Signed-off-by: Hongjin Li Change-Id: Iee936b378c6de53a781fb67c5394738c74729242 --- mpp/codec/dec/h265/h265d_refs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mpp/codec/dec/h265/h265d_refs.c b/mpp/codec/dec/h265/h265d_refs.c index 70f91c16..394911f8 100644 --- a/mpp/codec/dec/h265/h265d_refs.c +++ b/mpp/codec/dec/h265/h265d_refs.c @@ -97,7 +97,7 @@ static HEVCFrame *alloc_frame(HEVCContext *s) mpp_frame_set_hor_stride(frame->frame, (MPP_ALIGN(s->h265dctx->coded_width, 64) * s->h265dctx->nBitDepth) >> 3); mpp_frame_set_ver_stride(frame->frame, s->h265dctx->coded_height); - s->h265dctx->pix_fmt = 0; + s->h265dctx->pix_fmt &= MPP_FRAME_FMT_MASK; if (s->is_hdr) { s->h265dctx->pix_fmt |= MPP_FRAME_HDR; }