[Vorbis-dev] patch for non-seekable streams on Windows

Monty xiphmont at xiph.org
Thu Oct 14 17:11:25 PDT 2004




On Thu, Oct 14, 2004 at 04:59:34PM -0700, Vidur Apparao wrote:
> 
> I've been trying to get oggdec to work with input streamed in through a 
> pipe or a socket. This seems to work on Linux and OS X, but not on 
> Windows. I've found that code in vorbisfile.c tests the input stream for 
> seekability by invoking fseek in the following way:
> 
>  int offsettest=(f?callbacks.seek_func(f,0,SEEK_CUR) : -1);
> 
> Unfortunately, fseek succeeds for a socket on Windows (even though it's 
> not seekable) with the parameters specified. A more definitive test (and 
> one that does work on Windows) is to attempt to seek to the end. I've 
> attached a patch to vorbisfile.c that fixes my problem.

Oh, and I forgot to say:  Thanks for tracking it down :-)

Perhaps only some versions of windows have this bug?

Monty


More information about the Vorbis-dev mailing list