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:
reimar 2006-12-12 19:17:47 +00:00
parent b333ae1922
commit 1f2f5a5ea9
1 changed files with 3 additions and 0 deletions

View File

@ -876,6 +876,7 @@ static int uninit(priv_t *priv)
/* unqueue all remaining buffers */ /* unqueue all remaining buffers */
memset(&buf,0,sizeof(buf)); memset(&buf,0,sizeof(buf));
buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
buf.memory = V4L2_MEMORY_MMAP;
while (!ioctl(priv->video_fd, VIDIOC_DQBUF, &buf)); while (!ioctl(priv->video_fd, VIDIOC_DQBUF, &buf));
} }
@ -1395,6 +1396,7 @@ static void *video_grabber(void *data)
memset(&buf,0,sizeof(buf)); memset(&buf,0,sizeof(buf));
buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
buf.memory = V4L2_MEMORY_MMAP;
ret = ioctl(priv->video_fd, VIDIOC_DQBUF, &buf); ret = ioctl(priv->video_fd, VIDIOC_DQBUF, &buf);
if (ret < 0) { if (ret < 0) {
@ -1411,6 +1413,7 @@ static void *video_grabber(void *data)
for (i = 0; i < priv->mapcount; i++) { for (i = 0; i < priv->mapcount; i++) {
memset(&buf,0,sizeof(buf)); memset(&buf,0,sizeof(buf));
buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
buf.memory = V4L2_MEMORY_MMAP;
buf.index = i; buf.index = i;
ret = ioctl(priv->video_fd, VIDIOC_QUERYBUF, &buf); ret = ioctl(priv->video_fd, VIDIOC_QUERYBUF, &buf);
if (ret < 0) { if (ret < 0) {