Skip to content

Commit ac9f2d7

Browse files
committed
V4L2: fixed freeze when conversion is needed
1 parent 3e4aab1 commit ac9f2d7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/video_capture/v4l2.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -730,8 +730,10 @@ static struct video_frame * vidcap_v4l2_grab(void *state, struct audio_frame **a
730730

731731
// we do not need the driver buffer any more
732732
if (ioctl(s->fd, VIDIOC_QBUF, &buf) != 0) {
733-
perror("Unable to enqueue buffer");
734-
};
733+
log_msg(LOG_LEVEL_ERROR, "[V4L2 capture] Unable to enqueue buffer: %s\n", strerror(errno));
734+
} else {
735+
s->dequeued_buffers -= 1;
736+
}
735737

736738
if(ret == -1) {
737739
fprintf(stderr, "Error converting video.\n");

0 commit comments

Comments
 (0)