]> git.sesse.net Git - ffmpeg/blobdiff - ffmpeg.c
udp: try to clarify verbiage on buffer_size
[ffmpeg] / ffmpeg.c
index e345e410d820fcad23ffbd137fde16ff18282073..4b9209dd9268138d39c8b38ae5fde7aeb99d891a 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -303,15 +303,20 @@ static void sub2video_flush(InputStream *ist)
 
 /* end of sub2video hack */
 
-void term_exit(void)
+static void term_exit_sigsafe(void)
 {
-    av_log(NULL, AV_LOG_QUIET, "%s", "");
 #if HAVE_TERMIOS_H
     if(restore_tty)
         tcsetattr (0, TCSANOW, &oldtty);
 #endif
 }
 
+void term_exit(void)
+{
+    av_log(NULL, AV_LOG_QUIET, "%s", "");
+    term_exit_sigsafe();
+}
+
 static volatile int received_sigterm = 0;
 static volatile int received_nb_signals = 0;
 static int main_return_code = 0;
@@ -321,9 +326,9 @@ sigterm_handler(int sig)
 {
     received_sigterm = sig;
     received_nb_signals++;
-    term_exit();
+    term_exit_sigsafe();
     if(received_nb_signals > 3)
-        exit_program(123);
+        exit(123);
 }
 
 void term_init(void)