Hi. Le duodi 2 frimaire, an CCXIV, Wesley J. Landaker a ?crit?:> speexenc always crashes on amd64; here is an example, and lots of info:I tracked this bug a bit further than you. Here is the origin of the crash: op.packet = (unsigned char *)speex_header_to_packet(&header, (int*)&(op.bytes)); (from speexenc.c) op.bytes is a long, not an int, it is wrong to pass it as an int, and it is even wronger to use a cast to hide the warning. Here is a fix: --- speexenc.c.orig 2006-01-01 17:56:44.157165648 +0100 +++ speexenc.c 2006-01-01 17:57:39.994551085 +0100 @@ -629,7 +629,9 @@ /*Write header*/ { - op.packet = (unsigned char *)speex_header_to_packet(&header, (int*)&(op.bytes)); + int packet_size; + op.packet = (unsigned char *)speex_header_to_packet(&header, &packet_size); + op.bytes = size; op.b_o_s = 1; op.e_o_s = 0; op.granulepos = 0; Regards, -- Nicolas George -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 185 bytes Desc: Digital signature Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20060101/3bce3390/attachment.pgp
Le duodi 12 niv?se, an CCXIV, Nicolas George a ?crit?:> Here is a fix: > + op.bytes = size;And I posted too fast, sorry. The correct fix should include packet_size here. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 185 bytes Desc: Digital signature Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20060101/10d62a0d/attachment.pgp
Salut Nicolas, Thanks for the patch. I applied it in svn. Jean-Marc Le dimanche 01 janvier 2006 ? 18:08 +0100, Nicolas George a ?crit :> Hi. > > Le duodi 2 frimaire, an CCXIV, Wesley J. Landaker a ?crit : > > speexenc always crashes on amd64; here is an example, and lots of info: > > I tracked this bug a bit further than you. Here is the origin of the crash: > > op.packet = (unsigned char *)speex_header_to_packet(&header, (int*)&(op.bytes)); > > (from speexenc.c) > > op.bytes is a long, not an int, it is wrong to pass it as an int, and it is > even wronger to use a cast to hide the warning. > > Here is a fix: > > --- speexenc.c.orig 2006-01-01 17:56:44.157165648 +0100 > +++ speexenc.c 2006-01-01 17:57:39.994551085 +0100 > @@ -629,7 +629,9 @@ > /*Write header*/ > { > > - op.packet = (unsigned char *)speex_header_to_packet(&header, (int*)&(op.bytes)); > + int packet_size; > + op.packet = (unsigned char *)speex_header_to_packet(&header, &packet_size); > + op.bytes = size; > op.b_o_s = 1; > op.e_o_s = 0; > op.granulepos = 0; > > Regards, > > _______________________________________________ > Speex-dev mailing list > Speex-dev@xiph.org > http://lists.xiph.org/mailman/listinfo/speex-dev
Seemingly Similar Threads
- C55x Fixed Point PLC Stack Usage and Audio Quality
- Library export file for Win32 (patch)
- [PATCH] qemu pcnet emulation fixes
- Question on support for Upsonic Commercial UPS CXR 2000 - 2000VA/1200W - Rack/Tower on Freebsd 9.1.
- Question on support for Upsonic Commercial UPS CXR 2000 - 2000VA/1200W - Rack/Tower on Freebsd 9.1.