Improve MMAP handling

This commit is contained in:
Kamil Trzcinski
2022-04-05 14:37:48 +02:00
parent 5e836612ca
commit 0aa292fb84
3 changed files with 4 additions and 2 deletions

View File

@ -54,7 +54,7 @@ buffer_t *buffer_open(const char *name, buffer_list_t *buf_list, int index) {
buf->dma_fd = v4l2_exp.fd;
}
if (buf_list->do_capture) {
if (buf_list->do_capture && buf_list->do_mmap) {
buf->used = 0;
buffer_consumed(buf);
}