[FFmpeg-cvslog] ffmpeg: dont call exit_program() from a signal hander

Michael Niedermayer git at videolan.org
Wed Jun 25 17:01:24 CEST 2014


ffmpeg | branch: release/2.0 | Michael Niedermayer <michaelni at gmx.at> | Fri Mar 21 15:45:03 2014 +0100| [f65501f80cbc2f251b6a50b881652acb64540fe0] | committer: Michael Niedermayer

ffmpeg: dont call exit_program() from a signal hander

This is unsafe and can deadlock amongth other things

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 9dca02ee541120de2a96c387faed9a4e033a60fd)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f65501f80cbc2f251b6a50b881652acb64540fe0
---

 ffmpeg.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index 01cfaea..2a9bafd 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -319,7 +319,7 @@ sigterm_handler(int sig)
     received_nb_signals++;
     term_exit();
     if(received_nb_signals > 3)
-        exit_program(123);
+        exit(123);
 }
 
 void term_init(void)



More information about the ffmpeg-cvslog mailing list