mirror of
https://github.com/apache/nuttx.git
synced 2026-05-24 16:11:56 +08:00
drivers/video: Zero all video_framebuff_t fields in video_framebuff_init
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
committed by
Petro Karashchenko
parent
a64c61f530
commit
aa20b1e8bd
@@ -97,12 +97,8 @@ static inline vbuf_container_t *dequeue_vbuf_unsafe(video_framebuff_t *fbuf)
|
||||
|
||||
void video_framebuff_init(video_framebuff_t *fbuf)
|
||||
{
|
||||
fbuf->mode = V4L2_BUF_MODE_RING;
|
||||
fbuf->vbuf_empty = NULL;
|
||||
fbuf->vbuf_top = NULL;
|
||||
fbuf->vbuf_tail = NULL;
|
||||
fbuf->vbuf_next = NULL;
|
||||
|
||||
memset(fbuf, 0, sizeof(video_framebuff_t));
|
||||
fbuf->mode = V4L2_BUF_MODE_RING;
|
||||
nxmutex_init(&fbuf->lock_empty);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user