[FFmpeg-devel] [PATCHv2] ffmpeg: modify tty state when stderr is redirected

Nicolas George george at nsup.org
Fri Jul 31 10:32:47 CEST 2015


Le duodi 12 thermidor, an CCXXIII, Ganesh Ajjanagadde a écrit :
>  ffmpeg(){
> +    stty_opts="$(stty --save)"
>      dec_opts="-hwaccel $hwaccel -threads $threads -thread_type $thread_type"
>      ffmpeg_args="-nostats -cpuflags $cpuflags"
>      for arg in $@; do
> @@ -99,6 +100,7 @@ ffmpeg(){
>          ffmpeg_args="${ffmpeg_args} ${arg}"
>      done
>      run ffmpeg ${ffmpeg_args}
> +    stty "${stty_opts}"

Does this work? With that change, the return code of the wrapper function is
no longer the return code of "run ffmpeg" but the return code of stty,
always success.

There is a much simpler fix: add -nostdin to ffmpeg_args, along with
-nostats.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150731/aba3dfcc/attachment.sig>


More information about the ffmpeg-devel mailing list