From 53bf40f214d5634483240aedaa28a9e54fe518f5 Mon Sep 17 00:00:00 2001 From: tma Date: Sun, 2 Mar 2008 15:28:39 +0000 Subject: * Ogg codec fix regarding ogg files in pk3s (Tr3b) git-svn-id: svn://svn.icculus.org/quake3/trunk@1270 edf5b092-35ff-0310-97b2-ce42778d08ea --- code/client/snd_codec_ogg.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'code/client') diff --git a/code/client/snd_codec_ogg.c b/code/client/snd_codec_ogg.c index 98a5697..a4f1c77 100644 --- a/code/client/snd_codec_ogg.c +++ b/code/client/snd_codec_ogg.c @@ -198,15 +198,19 @@ int S_OGG_Callback_close(void *datasource) // ftell() replacement long S_OGG_Callback_tell(void *datasource) { + snd_stream_t *stream; + // check if input is valid if(!datasource) { - errno = EBADF; + errno = EBADF; return -1; } - // we keep track of the file position in stream->pos - return (long) (((snd_stream_t *) datasource) -> pos); + // snd_stream_t in the generic pointer + stream = (snd_stream_t *) datasource; + + return (long) FS_FTell(stream->file); } // the callback structure -- cgit v1.2.3