$NetBSD: patch-ab,v 1.1.1.1 2002/09/24 09:35:17 chris Exp $ --- ogg123/oggvorbis_format.c.orig Sat Sep 14 18:43:49 2002 +++ ogg123/oggvorbis_format.c Sat Sep 14 18:45:10 2002 @@ -19,8 +19,8 @@ #include #include #include -#include -#include +#include +#include #include "transport.h" #include "format.h" #include "utf8.h" @@ -150,8 +150,7 @@ while (nbytes > 0) { old_section = priv->current_section; - ret = ov_read(&priv->vf, ptr, nbytes, audio_fmt->big_endian, - audio_fmt->word_size, audio_fmt->signed_sample, + ret = ov_read(&priv->vf, ptr, nbytes, &priv->current_section); if (ret == 0) { @@ -193,15 +192,17 @@ } -int ovf_seek (decoder_t *decoder, double offset, int whence) +int ovf_seek (decoder_t *decoder, double aoffset, int whence) { ovf_private_t *priv = decoder->private; int ret; - double cur; + ogg_int64_t cur; + ogg_int64_t offset = (aoffset * 1000); + if (whence == DECODER_SEEK_CUR) { cur = ov_time_tell(&priv->vf); - if (cur >= 0.0) + if (cur >= 0) offset += cur; else return 0;