diff --git a/configure.ac b/configure.ac index 83fb3fde..ea8e9986 100644 --- a/configure.ac +++ b/configure.ac @@ -243,7 +243,7 @@ AC_TRY_COMPILE([#include ], [int a = 1;], # Hunt through several possible directories to find the includes for libxml2 if test "x$XML2_INCLUDE" = "x"; then old_CPPFLAGS="$CPPFLAGS" - for i in $xml2_include_dir /usr/include /usr/local/include /usr/include/libxml2 /usr/local/include/libxml2 ; do + for i in $xml2_include_dir ${prefix}/usr/include ${prefix}/usr/local/include ${prefix}/usr/include/libxml2 ${prefix}/usr/local/include/libxml2 ; do CPPFLAGS="$old_CPPFLAGS -I$i" AC_TRY_COMPILE([#include ], [int a = 1;], XML2_INCLUDE="-I$i", diff --git a/src/g722.c b/src/g722.c index f9bd7f37..187e41e1 100644 --- a/src/g722.c +++ b/src/g722.c @@ -415,13 +415,13 @@ SPAN_DECLARE(int) g722_decode(g722_decode_state_t *s, int16_t amp[], const uint8 if (s->eight_k) { /* We shift by 1 to allow for the 15 bit input to the G.722 algorithm. */ - amp[outlen++] = (int16_t) (rlow << 1); + amp[outlen++] = saturate16 (rlow << 1); } else { /* Apply the QMF to build the final signal */ - s->x[s->ptr] = (int16_t) (rlow + rhigh); - s->y[s->ptr] = (int16_t) (rlow - rhigh); + s->x[s->ptr] = saturate16 (rlow + rhigh); + s->y[s->ptr] = saturate16 (rlow - rhigh); if (++s->ptr >= 12) s->ptr = 0; /* We shift by 12 to allow for the QMF filters (DC gain = 4096), less 1