[FFmpeg-cvslog] r22599 - trunk/ffmpeg.c

Ramiro Polla ramiro.polla
Fri Mar 19 20:23:07 CET 2010


On Fri, Mar 19, 2010 at 1:25 PM, mru <subversion at mplayerhq.hu> wrote:
> Author: mru
> Date: Fri Mar 19 17:25:11 2010
> New Revision: 22599
>
> Log:
> Register atexit handler only when needed
>
> Modified:
> ? trunk/ffmpeg.c
>
> Modified: trunk/ffmpeg.c
> ==============================================================================
> --- trunk/ffmpeg.c ? ? ?Fri Mar 19 08:44:38 2010 ? ? ? ?(r22598)
> +++ trunk/ffmpeg.c ? ? ?Fri Mar 19 17:25:11 2010 ? ? ? ?(r22599)
> @@ -318,14 +318,12 @@ typedef struct AVInputFile {
>
> ?/* init terminal so that we can grab keys */
> ?static struct termios oldtty;
> -#endif
>
> ?static void term_exit(void)
> ?{
> -#if HAVE_TERMIOS_H
> ? ? tcsetattr (0, TCSANOW, &oldtty);
> -#endif
> ?}
> +#endif
>
> ?static volatile int received_sigterm = 0;
>
> @@ -343,6 +341,7 @@ static void term_init(void)
>
> ? ? tcgetattr (0, &tty);
> ? ? oldtty = tty;
> + ? ?atexit(term_exit);
>
> ? ? tty.c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP
> ? ? ? ? ? ? ? ? ? ? ? ? ? |INLCR|IGNCR|ICRNL|IXON);
> @@ -363,10 +362,6 @@ static void term_init(void)
> ? ? signal(SIGXCPU, sigterm_handler);
> ?#endif
>
> - ? ?/*
> - ? ?register a function to be called at normal program termination
> - ? ?*/
> - ? ?atexit(term_exit);
> ?#if CONFIG_BEOS_NETSERVER
> ? ? fcntl(0, F_SETFL, fcntl(0, F_GETFL) | O_NONBLOCK);
> ?#endif

http://fate.multimedia.cx/index.php?stderr=202654



More information about the ffmpeg-cvslog mailing list