summarylogtreecommitdiffstats
path: root/fixes-16.0.0.diff
blob: d3aa0a9cea00619358ce1313f85ada6791bee41e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
diff --git a/codec_g72x.c b/codec_g72x.c
index 959436e..0a8ea45 100644
--- a/codec_g72x.c
+++ b/codec_g72x.c
@@ -469,8 +469,12 @@ static void g72x_destroy(struct ast_trans_pvt *pvt)
 #if !G72X_BCG729
     ippsFree(state->coder);
     ippsFree(state->scratch_mem);
+#else
+#if G72X_ASTERISK >= 160
+    ast_std_free(state->coder);
 #else
     free(state->coder);
+#endif
 #endif
     /* output the sizes of frames passed to decoder */
     if (option_verbose > 2 && frame_sizes != NULL) {
diff --git a/configure.ac b/configure.ac
index d72b052..43b82f9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -41,7 +41,7 @@ if test "${prefix}" != "/usr"; then
 fi
 #echo new prefix: "${prefix}"
 
-ASTERISK_VERSION="150";
+ASTERISK_VERSION="160";
 
 AC_ARG_WITH(asterisk-includes,
     AS_HELP_STRING([--with-asterisk-includes=PATH], [Path to Asterisk includes (defaults to PREFIX/include, so try --prefix first)]),
@@ -65,8 +65,11 @@ AC_ARG_WITH(asterisk140,
     AS_HELP_STRING([--with-asterisk140], [Build for Asterisk 14]),
     [ASTERISK_VERSION="140"])
 AC_ARG_WITH(asterisk150,
-    AS_HELP_STRING([--with-asterisk150], [Build for Asterisk 15 (the default)]),
+    AS_HELP_STRING([--with-asterisk150], [Build for Asterisk 15]),
     [ASTERISK_VERSION="150"])
+AC_ARG_WITH(asterisk160,
+    AS_HELP_STRING([--with-asterisk160], [Build for Asterisk 16 (the default)]),
+    [ASTERISK_VERSION="160"])
 
 AC_ARG_WITH(ipp,
     AS_HELP_STRING([--with-ipp=PATH], [Path to Intel IPP (/path/to/ipp)]),
diff --git a/unsupported/g72x-build.sh b/unsupported/g72x-build.sh
index e233933..1e16fec 100755
--- a/unsupported/g72x-build.sh
+++ b/unsupported/g72x-build.sh
@@ -180,7 +180,7 @@ mkdir -p bin/
 
 a=ast150
 ast=/opt/asterisk
-def2=-DG72X_ASTERISK=150
+def2=-DG72X_ASTERISK=160
 codec=g729 dir=$srcdir all &
 codec=g723 dir=$srcdir all &