[FFmpeg-user] stopping ffmpeg correctly while piping

Dave Rice dave at dericed.com
Thu Jan 11 22:48:26 EET 2018


> On Jan 11, 2018, at 3:40 PM, Moritz Barsnick <barsnick at gmx.net> wrote:
> 
> On Thu, Jan 11, 2018 at 21:11:55 +0100, Nicolas George wrote:
>>> So apparently, ffmpeg is getting some different signal under Linux,
>>> and/or handling it differently.
>> 
>> SIGPIPE, obviously.
> 
> It was originally obvious to me. Except that I don't get what Windows
> does differently. But I never engaged with Windows stuff anyway, I'm
> Unix.
> 
> It wasn't obvious to me, as my addition of a SIGPIPE handler didn't
> work. But now it does. Hmm:
> 
> Exiting normally, received signal 13.
> 
> Nice. Nicolas, do you think adding
> 
>    signal(SIGPIPE, sigterm_handler); /* Termination (pipe closed).  */
> 
> to ffmpeg.c would be accepted as a patch? I don't know all the
> implications, it might be worth a review therefore.

That solution works for me.
Dave



More information about the ffmpeg-user mailing list