From ffcc6e24f5dfa98dfcdcae39f5f85c1f5b8d52e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5ns=20Rullg=C3=A5rd?= Date: Wed, 20 Jan 2010 06:42:39 +0000 Subject: Add -timelimit option This option limits the CPU time used by ffmpeg to the number of seconds specified. After this time, the OS sends a SIGXCPU signal, which we handle and attempt to exit cleanly. If the process is stuck, the OS will deliver a SIGKILL one second later, forcibly terminating the process. This functionality is useful in automated setups where a runaway ffmpeg process would otherwise go undetected. Originally committed as revision 21347 to svn://svn.ffmpeg.org/ffmpeg/trunk --- cmdutils.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'cmdutils.h') diff --git a/cmdutils.h b/cmdutils.h index d2d722b085..9190a81fd9 100644 --- a/cmdutils.h +++ b/cmdutils.h @@ -55,6 +55,11 @@ int opt_default(const char *opt, const char *arg); */ int opt_loglevel(const char *opt, const char *arg); +/** + * Limit the execution time. + */ +int opt_timelimit(const char *opt, const char *arg); + /** * Parses a string and returns its corresponding value as a double. * Exits from the application if the string cannot be correctly -- cgit v1.2.1