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 /res/res_musiconhold.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 'res/res_musiconhold.c')
-rw-r--r-- | res/res_musiconhold.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c index eb4330e21..6411af242 100644 --- a/res/res_musiconhold.c +++ b/res/res_musiconhold.c @@ -392,7 +392,7 @@ static void moh_files_write_format_change(struct ast_channel *chan, void *data) if (&state->origwfmt.id) { struct ast_format tmp; - ast_format_copy(&tmp, &chan->writeformat); + ast_format_copy(&tmp, ast_channel_writeformat(chan)); if (state->mohwfmt.id) { ast_format_clear(&state->origwfmt); ast_set_write_format(chan, &state->mohwfmt); @@ -470,8 +470,8 @@ static void *moh_files_alloc(struct ast_channel *chan, void *params) } state->class = mohclass_ref(class, "Reffing music class for channel"); - ast_format_copy(&state->origwfmt, &chan->writeformat); - ast_format_copy(&state->mohwfmt, &chan->writeformat); + ast_format_copy(&state->origwfmt, ast_channel_writeformat(chan)); + ast_format_copy(&state->mohwfmt, ast_channel_writeformat(chan)); /* For comparison on restart of MOH (see above) */ ast_copy_string(state->name, class->name, sizeof(state->name)); @@ -992,7 +992,7 @@ static void *moh_alloc(struct ast_channel *chan, void *params) } if ((res = mohalloc(class))) { - ast_format_copy(&res->origwfmt, &chan->writeformat); + ast_format_copy(&res->origwfmt, ast_channel_writeformat(chan)); if (ast_set_write_format(chan, &class->format)) { ast_log(LOG_WARNING, "Unable to set channel '%s' to format '%s'\n", ast_channel_name(chan), ast_codec2str(&class->format)); moh_release(NULL, res); |