Add -timelimit option
authorMåns Rullgård <mans@mansr.com>
Wed, 20 Jan 2010 06:42:39 +0000 (06:42 +0000)
committerMåns Rullgård <mans@mansr.com>
Wed, 20 Jan 2010 06:42:39 +0000 (06:42 +0000)
commitffcc6e24f5dfa98dfcdcae39f5f85c1f5b8d52e1
tree12253316dd457c8490bcdddc5879603e65fe3802
parent5e7dfb7de11dab3cbf8663d4fcb682935bd3a80b
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.c
cmdutils.h
ffmpeg.c