[Asterisk-video] AMR codec work for x86_64 system has error

Klaus Darilion klaus.mailinglists at pernau.at
Tue Dec 30 00:33:53 CST 2008


Hi Liu!

Some time ago someone posted this patch:

regards
klaus



Klaus Keppler wrote:
 > There's also a small trick.
 > Sorry for not having told this until now, I'm just working with
 > all these libs for a few days and wanted to "collect" patches
 > (and learn more, of course) before publishing them.
 >
 > Just apply this simple patch within the AMR source directory
 > (/usr/src/asterisk-.../codecs/amr):
---cut---
--- typedef.h.orig      2004-03-05 00:00:02.000000000 +0100
+++ typedef.h   2008-09-24 19:34:49.813538000 +0200
@@ -12,10 +12,12 @@
   #ifndef _TYPEDEF_H
   #define _TYPEDEF_H

-typedef char Word8;
-typedef unsigned char UWord8;
-typedef short Word16;
-typedef long Word32;
+#include <stdint.h>
+
+typedef int8_t Word8;
+typedef uint8_t UWord8;
+typedef int16_t Word16;
+typedef int32_t Word32;
   typedef float Float32;
   typedef double Float64;
---cut---
 >
 > I wasn't able to test if the codec *works* with these changes
 > (though they should just preserve the original behaviour), but
 > at least for me, it compiles well and Asterisk doesn't crash
 > any more when starting. :)
 >
 > Best regards,
 >
 >     klaus








Lxit wrote:
> Hello all,
> 
> I compile amr code(26104-700_ANSI_C_source_code.zip) for asterisk by
> x86_64 system is no problem.Now,I load codec_amr.so have "Segmentation
> fault" error when I configure the AMR codec to use octed aligned mode
> add this to codecs.conf [amr] octet-aligned=1.
> 
> I tried the same code by x86 system is fine.So I followed debug info and
> add ast_log sentence for codec_amr.c.I find out the
> "Decoder_Interface_Decode" Function(this function in interf_dec.c )
> produced "Segmentation fault" error.
> 
> I don't know that if 26104-700_ANSI_C_source_code.zip can't use for
> x86_64 system.
> 
> Any comments will be much appreciated.
> 
> Ethan Liu
> 
> 
> 
> 
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
> 
> asterisk-video mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-video



More information about the asterisk-video mailing list