[Asterisk-Dev] RFC3389 problem a little more info..
cf at internetit.dk
cf at internetit.dk
Tue Sep 7 09:28:33 MST 2004
Hi Again,
Added some more info in rtp.c, and this the problem:
RFC3389: 5 bytes, level 0...
RFC3389: Copying 5 bytes....
Segmentation fault
static struct ast_frame *process_rfc3389(struct ast_rtp *rtp, unsigned char *data, int len)
{
struct ast_frame *f = NULL;
/* Convert comfort noise into audio with various codecs. Unfortunately this doesn't
totally help us out becuase we don't have an engine to keep it going and we are not
guaranteed to have it every 20ms or anything */
#if 1
printf("RFC3389: %d bytes, level %d...\n", len, rtp->lastrxformat);
#endif
if (!(rtp->flags & FLAG_3389_WARNING)) {
ast_log(LOG_NOTICE, "RFC3389 support incomplete. Turn off on client if possible\n");
rtp->flags |= FLAG_3389_WARNING;
}
/* Must have at least one byte */
if (!len) {
printf("RFC3389: Lenghth is -1 or null bytes.... \n");
return NULL;
}
if (len < 24) {
printf("RFC3389: Copying %d bytes.... \n", len);
rtp->f.datalen = len - 1;
memcpy(rtp->f.data, data + 1, len - 1);
printf("RFC3389: Copying finished %d bytes.... \n", len);
} else {
printf("RFC3389: Copying 0 bytes.... \n");
rtp->f.datalen = 0;
}
printf("RFC3389: Preparing return.... \n");
rtp->f.frametype = AST_FRAME_CNG;
rtp->f.subclass = data[0] & 0x7f;
rtp->f.datalen = len - 1;
rtp->f.samples = 0;
rtp->f.delivery.tv_usec = rtp->f.delivery.tv_sec = 0;
f = &rtp->f;
printf("RFC3389: Returning f.... \n");
return f;
}
Does this occur because the len is set but the data isn't there??
Kind regards
Claus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20040907/e7b6f6b9/attachment.htm
More information about the asterisk-dev
mailing list