From aabbb9f9bb115f082db1318be2d128b153e0de9d Mon Sep 17 00:00:00 2001 From: zhanghongyuan Date: Tue, 18 Aug 2026 09:06:07 +0800 Subject: [PATCH] fix: sync resolution config after prepare_new_resolution (#372317) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sync my_config width/height with actual values after v4l2core_prepare_new_resolution to avoid config mismatch. 在 v4l2core_prepare_new_resolution 调用后同步 my_config 的 宽高配置,避免配置值与实际分辨率不一致。 Log: 同步分辨率配置 PMS: BUG-372317 Influence: 修复相机分辨率配置与实际设置不同步的问题,确保配置文件记录的分辨率与实际使用的分辨率一致。 --- src/src/LPF_V4L2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/src/LPF_V4L2.c b/src/src/LPF_V4L2.c index 7a79ecdf..a6a180b4 100644 --- a/src/src/LPF_V4L2.c +++ b/src/src/LPF_V4L2.c @@ -220,6 +220,8 @@ int camInit(const char *devicename) my_config->height = get_my_height(); } else { v4l2core_prepare_new_resolution(my_vd, my_config->width, my_config->height); + my_config->width = get_my_width(); + my_config->height = get_my_height(); } ret = v4l2core_update_old_format(my_vd, my_config->width, my_config->height, v4l2core_get_requested_frame_format(my_vd)); } else {