[FFmpeg-trac] #42(FFmpeg:open): don't read stdin when running in a noninteractive shell

FFmpeg trac at avcodec.org
Wed Jun 22 14:40:32 CEST 2011


#42: don't read stdin when running in a noninteractive shell
---------------------------------------+---------------------
Reporter:  taeuber                     |       Owner:
    Type:  enhancement                 |      Status:  open
Priority:  wish                        |   Component:  FFmpeg
 Version:  git                         |  Resolution:
Keywords:  noninteractive shell stdin  |  Blocked By:
Blocking:                              |  Reproduced:  0
Analyzed:  0                           |
---------------------------------------+---------------------

Comment (by taeuber):

 Hi Michael,

 i found the correct solution:
 {{{
 int interactive()
 {
     return isatty(0);
 }
 }}}

 When STDIN is a terminal it is interactive otherwise not.

 Yes, so simple!!

 Best regards
 Lars

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/42#comment:5>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list