diff options
author | Terry Wilson <twilson@digium.com> | 2012-02-24 00:32:20 +0000 |
---|---|---|
committer | Terry Wilson <twilson@digium.com> | 2012-02-24 00:32:20 +0000 |
commit | ebaf59a656ef94e19332c08e0d0562b8cbe59f65 (patch) | |
tree | 6e75fd13924808bddacc18e14d5e02975a322481 /channels/chan_mgcp.c | |
parent | 235f88d12270b328ad466889189400666b3e56c1 (diff) |
Opaquification for ast_format structs in struct ast_channel
Review: https://reviewboard.asterisk.org/r/1770/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356573 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_mgcp.c')
-rw-r--r-- | channels/chan_mgcp.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c index b73ccd24c..96c22d155 100644 --- a/channels/chan_mgcp.c +++ b/channels/chan_mgcp.c @@ -1212,8 +1212,8 @@ static struct ast_frame *mgcp_rtp_read(struct mgcp_subchannel *sub) if (!ast_format_cap_iscompatible(ast_channel_nativeformats(sub->owner), &f->subclass.format)) { ast_debug(1, "Oooh, format changed to %s\n", ast_getformatname(&f->subclass.format)); ast_format_cap_set(ast_channel_nativeformats(sub->owner), &f->subclass.format); - ast_set_read_format(sub->owner, &sub->owner->readformat); - ast_set_write_format(sub->owner, &sub->owner->writeformat); + ast_set_read_format(sub->owner, ast_channel_readformat(sub->owner)); + ast_set_write_format(sub->owner, ast_channel_writeformat(sub->owner)); } /* Courtesy fearnor aka alex@pilosoft.com */ if ((sub->parent->dtmfmode & MGCP_DTMF_INBAND) && (sub->parent->dsp)) { @@ -1256,8 +1256,8 @@ static int mgcp_write(struct ast_channel *ast, struct ast_frame *frame) ast_log(LOG_WARNING, "Asked to transmit frame type %s, while native formats is %s (read/write = %s/%s)\n", ast_getformatname(&frame->subclass.format), ast_getformatname_multiple(buf, sizeof(buf), ast_channel_nativeformats(ast)), - ast_getformatname(&ast->readformat), - ast_getformatname(&ast->writeformat)); + ast_getformatname(ast_channel_readformat(ast)), + ast_getformatname(ast_channel_writeformat(ast))); /* return -1; */ } } @@ -1518,10 +1518,10 @@ static struct ast_channel *mgcp_new(struct mgcp_subchannel *sub, int state, cons ast_channel_rings_set(tmp, 1); ast_best_codec(ast_channel_nativeformats(tmp), &tmpfmt); - ast_format_copy(&tmp->writeformat, &tmpfmt); - ast_format_copy(&tmp->rawwriteformat, &tmpfmt); - ast_format_copy(&tmp->readformat, &tmpfmt); - ast_format_copy(&tmp->rawreadformat, &tmpfmt); + ast_format_copy(ast_channel_writeformat(tmp), &tmpfmt); + ast_format_copy(ast_channel_rawwriteformat(tmp), &tmpfmt); + ast_format_copy(ast_channel_readformat(tmp), &tmpfmt); + ast_format_copy(ast_channel_rawreadformat(tmp), &tmpfmt); ast_channel_tech_pvt_set(tmp, sub); if (!ast_strlen_zero(i->language)) ast_channel_language_set(tmp, i->language); |