[vlc-devel] [PATCH] v4l2: fixing mmap unmapping in video.StopMmap()

Alan McCosh amccosh at gmail.com
Wed Apr 18 17:50:40 CEST 2012


First attempt submitting this was blocked as spam, trying again.

---
 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);
 }
--
1.7.5.4



More information about the vlc-devel mailing list