[FFmpeg-devel] Windows deprecated stdin reading method
Reimar.Doeffinger at gmx.de
Sat Mar 7 23:38:36 CET 2015
On 07.03.2015, at 16:51, Peter <dravorek at googlemail.com> wrote:
> The issue is this patch
> which uses a member of the FILE struct which is not available in the
> new C runtime (it's now just a struct with a void*).
> I do not quite know the semantics of the stdin->_cnt > 0 check.
It checks if there is data in the buffer. The point is to do a non-blocking read on stdin.
> So I tried a few approaches, like using the deprecated function that is called
> after the #ifdef block anyway:
> (I'm kind of worried about this since using "read(0, &ch, 1);" instead
> of "getch" with that if
> condition actually blocks in some cases, so it's not 100% equivalent)
> Or trying to understand what the non-deprecated Win32 API calls would look like:
I don't think that's generic enough, you can't know what kind of thing stdin is, so using any non-generic function on it might break things...
More information about the ffmpeg-devel