[FFmpeg-devel] [PATCH] Add -timelimit option

Michael Niedermayer michaelni
Sat Nov 14 20:22:53 CET 2009

On Sat, Nov 14, 2009 at 04:49:22PM +0000, Mans Rullgard wrote:
> 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.
> ---
>  ffmpeg.c |   18 ++++++++++++++++++
>  1 files changed, 18 insertions(+), 0 deletions(-)

iam fine with this, but maybe the new function would be better put in
cmdutils.c ?
that way other tools (ffserver maybe?) could also use it

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Its not that you shouldnt use gotos but rather that you should write
readable code and code with gotos often but not always is less readable
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20091114/2effe247/attachment.pgp>

More information about the ffmpeg-devel mailing list