v4l2: queue dropped first buffer again

When we drop the first buffer to avoid timestamp problems, queue it
again in the driver or else we will not be able to dequeue is again
later and we will be running with a buffer less.
This commit is contained in:
Wim Taymans 2024-09-04 16:57:07 +02:00
parent f22206165a
commit 37eef2cf23

View file

@ -1411,8 +1411,10 @@ static int mmap_read(struct impl *this)
/* Drop the first frame in order to work around common firmware
* timestamp issues */
if (buf.sequence == 0)
if (buf.sequence == 0) {
xioctl(dev->fd, VIDIOC_QBUF, &buf);
return 0;
}
pts = SPA_TIMEVAL_TO_NSEC(&buf.timestamp);
spa_log_trace(this->log, "v4l2 %p: have output %d", this, buf.index);