video: add video buffer overflow warning info.

Signed-off-by: yaojingwei <yaojingwei@xiaomi.com>
This commit is contained in:
yaojingwei 2024-01-18 10:09:10 +08:00 committed by Xiang Xiao
parent fa1b55d297
commit 25e7d9e43e

View File

@ -24,6 +24,7 @@
#include <string.h>
#include <errno.h>
#include <syslog.h>
#include <nuttx/irq.h>
#include <nuttx/kmalloc.h>
@ -232,6 +233,7 @@ void video_framebuff_capture_done(video_framebuff_t *fbuf)
fbuf->vbuf_next = fbuf->vbuf_next->next;
if (fbuf->vbuf_next == fbuf->vbuf_top) /* RING mode case. */
{
syslog(LOG_WARNING, "video buffer is overflow.\n");
fbuf->vbuf_top = fbuf->vbuf_top->next;
fbuf->vbuf_tail = fbuf->vbuf_tail->next;
}