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: allow Q to close the window with option --no-loop
Author:  Hans Verkuil <hverk...@xs4all.nl>
Date:    Fri Feb 7 09:44:53 2025 +0100

If --no-loop was specified, and the end of the file was reached,
it would just sleep forever. This blocked the use of 'q' to close
the window since the Qt event loop was never called.

Just return instead and let the event loop deal with it.

Signed-off-by: Hans Verkuil <hverk...@xs4all.nl>

 utils/qvidcap/capture.cpp | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

---

http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=8171e89fa8b50f4dac1034041f5fcb488ee41b62
diff --git a/utils/qvidcap/capture.cpp b/utils/qvidcap/capture.cpp
index 15ad14f2feb8..1d51555d5ef3 100644
--- a/utils/qvidcap/capture.cpp
+++ b/utils/qvidcap/capture.cpp
@@ -1482,10 +1482,14 @@ void CaptureWin::tpgUpdateFrame()
 
        if (m_mode == AppModeFile && m_file.pos() + m_imageSize > 
m_file.size()) {
                if (m_no_loop) {
-                       printf("done\n");
-                       while (true)
-                               sleep(1000);
-                       exit(0);
+                       static bool done;
+
+                       if (!done) {
+                               if (m_verbose)
+                                       printf("done\n");
+                               done = true;
+                       }
+                       return;
                }
                if (m_verbose)
                        printf("loop\n");

Reply via email to