Merge branch 'master' into multichannel

This commit is contained in:
Tristan Matthews
2013-07-12 15:03:49 -04:00
2 changed files with 3 additions and 2 deletions

View File

@ -842,6 +842,7 @@ static int iax_reliable_xmit(struct iax_frame *f)
if (!fc->data || !fc->datalen) {
IAXERROR "No frame data?");
DEBU(G "No frame data?\n");
free(fc);
return -1;
} else {
fc->data = (char *)malloc(fc->datalen);

View File

@ -239,7 +239,7 @@ static void history_calc_maxbuf(jitterbuf *jb)
if (toins > jb->hist_maxbuf[j]) {
/* move over if there's space */
const size_t slide = (JB_HISTORY_MAXBUF_SZ - (j + 1)) * sizeof(jb->hist_maxbuf[0]);
if (slide > 0)
if (j < (JB_HISTORY_MAXBUF_SZ - 1))
memmove(jb->hist_maxbuf + j + 1, jb->hist_maxbuf + j, slide);
/* insert */
jb->hist_maxbuf[j] = toins;
@ -258,7 +258,7 @@ static void history_calc_maxbuf(jitterbuf *jb)
if (toins < jb->hist_minbuf[j]) {
/* move over if there's space */
const size_t slide = (JB_HISTORY_MAXBUF_SZ - (j + 1)) * sizeof(jb->hist_minbuf[0]);
if (slide > 0)
if (j < (JB_HISTORY_MAXBUF_SZ - 1))
memmove(jb->hist_minbuf + j + 1, jb->hist_minbuf + j, slide);
/* insert */
jb->hist_minbuf[j] = toins;