From 3f97b0d73f452b63c843640cffcdf97fd000197c Mon Sep 17 00:00:00 2001 From: Ding Wei Date: Fri, 12 Apr 2024 17:49:02 +0800 Subject: [PATCH] fix[vpu_api]: Fix frame format and eos cfg Input encode frame should set format and eos Change-Id: I08536bcb022cafcb3756745841b85b24929401cb Signed-off-by: Ding Wei --- mpp/legacy/vpu_api_legacy.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mpp/legacy/vpu_api_legacy.cpp b/mpp/legacy/vpu_api_legacy.cpp index 3205be45..406017b1 100644 --- a/mpp/legacy/vpu_api_legacy.cpp +++ b/mpp/legacy/vpu_api_legacy.cpp @@ -1102,6 +1102,11 @@ RK_S32 VpuApiLegacy::encode(VpuCodecContext *ctx, EncInputStream_t *aEncInStrm, mpp_err("unsupport format 0x%x\n", format & MPP_FRAME_FMT_MASK); } break; } + mpp_frame_set_fmt(frame, (MppFrameFormat)(format & MPP_FRAME_FMT_MASK)); + if (aEncInStrm->nFlags) { + mpp_log_f("found eos\n"); + mpp_frame_set_eos(frame, 1); + } fd = aEncInStrm->bufPhyAddr; if (fd_input < 0) { @@ -1361,7 +1366,7 @@ RK_S32 VpuApiLegacy::encoder_sendframe(VpuCodecContext *ctx, EncInputStream_t *a mpp_err("unsupport format 0x%x\n", format & MPP_FRAME_FMT_MASK); } break; } - + mpp_frame_set_fmt(frame, (MppFrameFormat)(format & MPP_FRAME_FMT_MASK)); if (aEncInStrm->nFlags) { mpp_log_f("found eos true\n"); mpp_frame_set_eos(frame, 1);