Skip to content
Snippets Groups Projects
Commit cb424d37 authored by Nicolas Dufresne's avatar Nicolas Dufresne
Browse files

Reset flushing state if DQBUF return EPIPE


This is to handle the case there was no more buffer to dequeue,
otherwise flushing state will stick and we will not be able to to queue
buffer afterward.

Signed-off-by: default avatarNicolas Dufresne <nicolas.dufresne@collabora.com>
parent bf34a794
No related branches found
No related tags found
No related merge requests found
......@@ -432,8 +432,15 @@ static int ioctl_dqbuf_locked(struct encoder_context *ctx, int fd,
}
ret = SYS_IOCTL(fd, VIDIOC_DQBUF, buffer);
if (ret)
if (ret) {
/* In some cases we may not have a buffer with the V4L2_BUF_FLAG_LAST set,
* make sure to reset our flushing state */
if (errno == EPIPE) {
ctx->flushing = false;
ctx->can_qbuf = true;
}
return ret;
}
ret = SYS_IOCTL(fd, VIDIOC_QUERYBUF, buffer);
if (ret)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment