[vorbis-dev] Re: libogg 1.1 test failure on alpha
Bill Nottingham
notting at redhat.com
Mon Nov 24 21:04:40 PST 2003
Christian Weisgerber (naddy at mips.inka.de) said:
> > i386 completes fine. I haven't tried any BE machines yet.
>
> I've tried a few more archs and it's specifically a 64-bit problem.
The oggpackB_{look,read} functions appear to not be right on 64-bit.
Note that these functions aren't used in any vorbis code AFAICT;
they were only added for VP3 and later codecs according to the
CVS log.
The following very wrong patch makes the tests succeed. :)
Bill
-------------- next part --------------
diff -ru libogg-1.1/src/bitwise.c libogg-1.1-fixed/src/bitwise.c
--- libogg-1.1/src/bitwise.c 2003-11-10 08:06:08.000000000 -0500
+++ libogg-1.1-fixed/src/bitwise.c 2003-11-24 23:54:40.000000000 -0500
@@ -250,7 +250,7 @@
/* Read in bits without advancing the bitptr; bits <= 32 */
long oggpackB_look(oggpack_buffer *b,int bits){
- unsigned long ret;
+ unsigned int ret;
int m=32-bits;
bits+=b->endbit;
@@ -346,7 +346,7 @@
/* bits <= 32 */
long oggpackB_read(oggpack_buffer *b,int bits){
- unsigned long ret;
+ unsigned int ret;
long m=32-bits;
bits+=b->endbit;
@@ -376,7 +376,7 @@
b->ptr+=bits/8;
b->endbyte+=bits/8;
b->endbit=bits&7;
- return(ret);
+ return(ret == -1 ? -1UL : ret);
}
long oggpack_read1(oggpack_buffer *b){
𸬵ªÜ+Þ²m§ÿðÃb¦+ö«r¯zÏÎ
k¢7¶&z zm§ÿðÃb¦+ú ôèº{.nÇ+·®+%ËlzwZë,j¢ú+n+zúު笷©àríj)â
'+a{
+véì¹»®&Þ{ayºÈÚ,¹¸ÞrجçyÕ'²æìr¸zg¬±¨²Ç§¶Ú-
éb²Ü"VÞ èç~)mz·
More information about the Vorbis-dev
mailing list