[MPlayer-dev-eng] [PATCH] ao_pcm: use native api for file operations on Win32

Reimar Döffinger Reimar.Doeffinger at gmx.de
Mon Mar 23 10:40:42 CET 2009


On Mon, Mar 23, 2009 at 03:31:57PM +0800, Zhou Zongyi wrote:
> The problem is caused by fseek since fseek always returns 0 on Win32 even if the file is not seekable.

So what does ftell return?

> On windows we can use GetFileType to determine whether a file is seekable.
> So far I have not found an equivelant function in standard C library.
> The following patch solve the problem by using WinAPI instead of C functions for file operations.

That's overkill, you can use
_get_osfhandle(_fileno(file))



More information about the MPlayer-dev-eng mailing list