This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/cgit.cgi/v4l-utils.git tree:

Subject: qvidcap: fix core dump
Author:  Hans Verkuil <hverkuil-ci...@xs4all.nl>
Date:    Mon Jul 22 11:06:03 2024 +0200

The 'cv4l_queue q' variable went out of scope too early,
causing a core dump when g_dataptr was called later.

I suspect it was pure luck that this ever worked, but the changes
to support more than 32 buffers in combination with vivid supporting
this new feature, caused this bug to surface.

Signed-off-by: Hans Verkuil <hverkuil-ci...@xs4all.nl>
(cherry picked from commit f09b2c091d90228547433f11f94015b9ecfeff13)
Signed-off-by: Gregor Jasny <gja...@googlemail.com>

 utils/qvidcap/qvidcap.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

---

http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=b40f4a5cac7be46941168ba73113086832a1b071
diff --git a/utils/qvidcap/qvidcap.cpp b/utils/qvidcap/qvidcap.cpp
index f4bb9d2895db..f9d7a4187862 100644
--- a/utils/qvidcap/qvidcap.cpp
+++ b/utils/qvidcap/qvidcap.cpp
@@ -434,6 +434,7 @@ int main(int argc, char **argv)
        cv4l_fd fd;
        enum AppMode mode = AppModeV4L2;
        int sock_fd = -1;
+       cv4l_queue q;
        cv4l_fmt fmt;
        v4l2_fract pixelaspect = { 1, 1 };
        unsigned cnt = 0;
@@ -807,7 +808,7 @@ int main(int argc, char **argv)
        if (mode == AppModeSocket)
                win.setModeSocket(sock_fd, port);
        else if (mode == AppModeV4L2) {
-               cv4l_queue q(fd.g_type(), V4L2_MEMORY_MMAP);
+               q.init(fd.g_type(), V4L2_MEMORY_MMAP);
                q.reqbufs(&fd, v4l2_bufs);
                q.obtain_bufs(&fd);
                q.queue_all(&fd);

Reply via email to