video/v4l2_cap: fix sign extension

Signed-off-by: shizhenghui <shizhenghui@xiaomi.com>
This commit is contained in:
shizhenghui 2024-08-20 12:00:58 +08:00 committed by Xiang Xiao
parent 6ff3ed83fc
commit 04dfae545c
1 changed files with 3 additions and 1 deletions

View File

@ -1295,7 +1295,9 @@ static int validate_frame_setting(FAR capture_mng_t *cmng,
static size_t get_bufsize(FAR video_format_t *vf)
{
size_t ret = vf->width * vf->height;
uint32_t width = vf->width;
uint32_t height = vf->height;
size_t ret = width * height;
switch (vf->pixelformat)
{