[FFmpeg-devel] [PATCH][RFC] ffmpeg: remove access to private FILE struct members on Windows

Michael Niedermayer michael at niedermayer.cc
Mon Aug 3 21:50:51 CEST 2015


On Mon, Aug 03, 2015 at 09:30:33PM +0200, Nicolas George wrote:
> Le sextidi 16 thermidor, an CCXXIII, Michael Niedermayer a écrit :
> > i also found this comment in a patch in my inbox:
> > 
> > +  /* When using Standard C input functions, also check if there
> > +   is anything in the buffer. After a call to such functions,
> > +   the input waiting in the pipe will be copied to the buffer,
> > +   and the call to PeekNamedPipe can indicate no input available.
> > +   Setting stdin to unbuffered was not enough, IIRC */
> > +  if (stdin->_cnt > 0)
> > +  {
> > +    char ch;
> > +    //Read it
> > +    read(0, &ch, 1);
> > +    return ch;
> > +  }
> > 
> > This seems to explain what the code was intended to do
> 
> That was my guess.
> 

> This is ugly, and should be removed anyways. It is not possible to mix stdio

i would tend to agree, a clean solution would be highly preferrable

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No human being will ever know the Truth, for even if they happen to say it
by chance, they would not even known they had done so. -- Xenophanes
-------------- 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/20150803/7c98357b/attachment.sig>


More information about the ffmpeg-devel mailing list