mirror of https://github.com/mpv-player/mpv
Add missing buf.memory = V4L2_MEMORY_MMAP; initializations.
Patch by Laurent Pinchart {laurent pinchart <at> skynet be} git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21603 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
b333ae1922
commit
1f2f5a5ea9
|
@ -876,6 +876,7 @@ static int uninit(priv_t *priv)
|
|||
/* unqueue all remaining buffers */
|
||||
memset(&buf,0,sizeof(buf));
|
||||
buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||
buf.memory = V4L2_MEMORY_MMAP;
|
||||
while (!ioctl(priv->video_fd, VIDIOC_DQBUF, &buf));
|
||||
}
|
||||
|
||||
|
@ -1395,6 +1396,7 @@ static void *video_grabber(void *data)
|
|||
|
||||
memset(&buf,0,sizeof(buf));
|
||||
buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||
buf.memory = V4L2_MEMORY_MMAP;
|
||||
ret = ioctl(priv->video_fd, VIDIOC_DQBUF, &buf);
|
||||
|
||||
if (ret < 0) {
|
||||
|
@ -1411,6 +1413,7 @@ static void *video_grabber(void *data)
|
|||
for (i = 0; i < priv->mapcount; i++) {
|
||||
memset(&buf,0,sizeof(buf));
|
||||
buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||
buf.memory = V4L2_MEMORY_MMAP;
|
||||
buf.index = i;
|
||||
ret = ioctl(priv->video_fd, VIDIOC_QUERYBUF, &buf);
|
||||
if (ret < 0) {
|
||||
|
|
Loading…
Reference in New Issue