--- a/asterisk-1.8.15-cert5/channels/chan_sip.c +++ b/asterisk-1.8.15-cert5/channels/chan_sip.c @@ -4385,12 +4385,12 @@ static int sip_setoption(struct ast_channel *chan, int option, void *data, int d switch (option) { case AST_OPTION_FORMAT_READ: if (p->rtp) { - res = ast_rtp_instance_set_read_format(p->rtp, *(int *) data); + res = ast_rtp_instance_set_read_format(p->rtp, *(format_t *) data); } break; case AST_OPTION_FORMAT_WRITE: if (p->rtp) { - res = ast_rtp_instance_set_write_format(p->rtp, *(int *) data); + res = ast_rtp_instance_set_write_format(p->rtp, *(format_t *) data); } break; case AST_OPTION_MAKE_COMPATIBLE: diff --git a/asterisk-1.8.15-cert5/main/channel.c b/asterisk-1.8.15-cert5/main/channel.c index 23a29ff..9285ca5 100644 (file) --- a/asterisk-1.8.15-cert5/main/channel.c +++ b/asterisk-1.8.15-cert5/main/channel.c @@ -5209,7 +5209,7 @@ static int set_format(struct ast_channel *chan, format_t fmt, format_t *rawforma return 0; /* Let's try a call without any sounds (video, text) */ /* See if the underlying channel driver is capable of performing transcoding for us */ - if (!ast_channel_setoption(chan, direction ? AST_OPTION_FORMAT_WRITE : AST_OPTION_FORMAT_READ, &native_fmt, sizeof(int*), 0)) { + if (!ast_channel_setoption(chan, direction ? AST_OPTION_FORMAT_WRITE : AST_OPTION_FORMAT_READ, &native_fmt, sizeof(native_fmt), 0)) { ast_debug(1, "Channel driver natively set channel %s to %s format %s\n", chan->name, direction ? "write" : "read", ast_getformatname(native_fmt)); chan->nativeformats = *rawformat = *format = native_fmt;