[MPlayer-dev-eng] Re: Slave mode and pipes

Eric Lammerts eric at lammerts.org
Wed May 22 03:53:30 CEST 2002


On Tue, 21 May 2002, murban wrote:
> The program does start mplayer, but it is not able to get mplayer to
> respond to commands.

Output to a pipe is block buffered, so you need to fflush(stream)
after the fprintf.

Alternatively, you can set the buffering mode of stream to "line
buffered" using setvbuf(stream, NULL, _IOLBF, 0) before you start
printing.

Eric




More information about the MPlayer-dev-eng mailing list