[vorbis-dev] vorbisfile bug?
nvit at open.by
Wed Sep 25 15:08:54 PDT 2002
It seems vorbisfile has a bug.
There is a such string in ov_time_seek:
It is not accounted type convertion between double and ogg_int64_t.
E.g. if I convert 440267'th sample (44100Hz source) to time:
double dSec = 440267 / (double) 44100;
and then try to seek dSec:
the resulting offset will be 440266'th sample, because of
dSec*44100 gives 440266.999999997...
Probably the line
should be replaced with something like:
ogg_int64_t target=pcm_total+( (seconds-time_total)*vf->vi[link].rate +
It is very likely that this is not a unique place in source code with the
(I use Visual C++ 6.0)
--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the Vorbis-dev