[Vorbis-dev] [PATCH] checking for negative link

Ivo Danihelka ivo.danihelka at rdc.cz
Sun Nov 28 06:37:03 PST 2004


This patch ensures that lib/lib/vorbisfile.c will not use negative value
of "link" when seeking.
Negative value (link=-1) was used by ov_time_seek(vf, 0.0) at least.

Double arithmetic is not precise, it depends on order of operands.
"for(i=0;i<links;i++) sum+=x[i]" gives slightly different result than
"for(i=links-1;i>=0;i--) sum+=x[i]".


I tried add this patch to http://bugs.xiph.org/show_bug.cgi?id=577
bug report, but the bugzilla is not working correctly.

-- 
Ivo Danihelka
-------------- next part --------------
A non-text attachment was scrubbed...
Name: seeklink.diff
Type: text/x-patch
Size: 1255 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/vorbis-dev/attachments/20041128/e5a367b5/seeklink.bin


More information about the Vorbis-dev mailing list