]> git.sesse.net Git - nageru/commitdiff
Get rid of an unneeded sleep and message on Futatabi exit.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 10 Mar 2019 00:36:14 +0000 (01:36 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 10 Mar 2019 00:36:14 +0000 (01:36 +0100)
futatabi/main.cpp

index 9585dd4e4b3180201cd8d210187d4cf697114724..7c5f660ae5b97f928aed6b9c8daabe18a5744cc4 100644 (file)
@@ -535,8 +535,10 @@ void record_thread_func()
                        current_pts = pts;
                }
 
-               fprintf(stderr, "%s: Hit EOF. Waiting one second and trying again...\n", global_flags.stream_source.c_str());
-               sleep(1);
+               if (!should_quit.load()) {
+                       fprintf(stderr, "%s: Hit EOF. Waiting one second and trying again...\n", global_flags.stream_source.c_str());
+                       sleep(1);
+               }
 
                start_pts = last_pts + TIMEBASE;
        }