You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by pk...@apache.org on 2022/05/30 17:38:58 UTC

[incubator-nuttx] 05/11: drivers/video: Fix thumbnail size bug

This is an automated email from the ASF dual-hosted git repository.

pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit c0ea6c5b49ca0f3a0cab0853f2c52e1e77cfd97e
Author: SPRESENSE <41...@users.noreply.github.com>
AuthorDate: Thu Feb 3 09:54:09 2022 +0900

    drivers/video: Fix thumbnail size bug
    
    Fix copy size to set thumbnail component, when thumbnail format is used
    without clipping.
---
 drivers/video/video.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/video.c b/drivers/video/video.c
index 462639b68c..f4a3dfbfd4 100644
--- a/drivers/video/video.c
+++ b/drivers/video/video.c
@@ -635,7 +635,7 @@ static void get_clipped_format(uint8_t              nr_fmt,
     }
   else
     {
-      memcpy(c_fmt, fmt, sizeof(video_format_t));
+      memcpy(c_fmt, fmt, nr_fmt * sizeof(video_format_t));
     }
 }