[vlc-commits] v4l2: fixing mmap unmapping

Alan McCosh git at videolan.org
Wed Apr 18 18:51:18 CEST 2012


vlc | branch: master | Alan McCosh <amccosh at gmail.com> | Wed Apr 18 19:50:52 2012 +0300| [bf0e3035cbf6c8dea58e887a3326d7065d37db2f] | committer: Rémi Denis-Courmont

v4l2: fixing mmap unmapping

fixes regression introduced in 8d9f4bb6bdec56b957577812b00f7810888b22f4

Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bf0e3035cbf6c8dea58e887a3326d7065d37db2f
---

 modules/access/v4l2/video.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules/access/v4l2/video.c b/modules/access/v4l2/video.c
index 2e669dd..6ea3a92 100644
--- a/modules/access/v4l2/video.c
+++ b/modules/access/v4l2/video.c
@@ -663,7 +663,7 @@ void StopMmap (int fd, struct buffer_t *bufv, uint32_t bufc)
 
     /* STREAMOFF implicitly dequeues all buffers */
     v4l2_ioctl (fd, VIDIOC_STREAMOFF, &type);
-    for (uint32_t i = bufc; i < bufc; i++)
+    for (uint32_t i = 0; i < bufc; i++)
         v4l2_munmap (bufv[i].start, bufv[i].length);
     free (bufv);
 }



More information about the vlc-commits mailing list