[FFmpeg-devel] [PATCH 1/3] ffmpeg: set tty mode and signals after parsing options.

Michael Niedermayer michael at niedermayer.cc
Wed Mar 16 18:07:51 CET 2016


On Sun, Mar 13, 2016 at 12:07:46PM +0100, Nicolas George wrote:
> Signed-off-by: Nicolas George <george at nsup.org>
> ---
>  ffmpeg.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> 
> It seems more logical, and the next patch does not work without.
> 
> 
> diff --git a/ffmpeg.c b/ffmpeg.c
> index 9a14294..1887946 100644
> --- a/ffmpeg.c
> +++ b/ffmpeg.c
> @@ -4306,8 +4306,6 @@ int main(int argc, char **argv)
>  
>      show_banner(argc, argv, options);
>  
> -    term_init();
> -
>      /* parse options and open all input/output files */
>      ret = ffmpeg_parse_options(argc, argv);
>      if (ret < 0)
> @@ -4330,6 +4328,8 @@ int main(int argc, char **argv)
>  //         exit_program(1);
>  //     }
>  
> +    term_init();

This will prevent cleanup from being done on ctrl-c during the input
open stage
especially if input open is stuck due to network or whatever the
user likely would abort it.

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I know you won't believe me, but the highest form of Human Excellence is
to question oneself and others. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160316/f9d9be6c/attachment.sig>


More information about the ffmpeg-devel mailing list