aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_musiconhold.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2006-06-01 21:47:49 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2006-06-01 21:47:49 +0000
commite06b1ffd084d19d9996419923edf8b5705253a04 (patch)
tree0de5d2016250a6e0124bad34df560a18d96a344f /res/res_musiconhold.c
parentf4118684269c23d0da7d6b5eadde55539a17b560 (diff)
Merged revisions 31555 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r31555 | kpfleming | 2006-06-01 16:46:50 -0500 (Thu, 01 Jun 2006) | 2 lines remove pointless forcing of the channel into SLINEAR mode; the write format will be set later based on the file that is chosen to be played to the channel ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@31556 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_musiconhold.c')
-rw-r--r--res/res_musiconhold.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c
index ef68b3c98..e351e7347 100644
--- a/res/res_musiconhold.c
+++ b/res/res_musiconhold.c
@@ -226,10 +226,6 @@ static int ast_moh_files_next(struct ast_channel *chan)
state->pos = state->pos % state->class->total_files;
- if (ast_set_write_format(chan, AST_FORMAT_SLINEAR)) {
- ast_log(LOG_WARNING, "Unable to set '%s' to linear format (write)\n", chan->name);
- return -1;
- }
if (!ast_openstream_full(chan, state->class->filearray[state->pos], chan->language, 1)) {
ast_log(LOG_WARNING, "Unable to open file '%s': %s\n", state->class->filearray[state->pos], strerror(errno));
state->pos++;
@@ -303,14 +299,8 @@ static void *moh_files_alloc(struct ast_channel *chan, void *params)
state->origwfmt = chan->writeformat;
- if (ast_set_write_format(chan, AST_FORMAT_SLINEAR)) {
- ast_log(LOG_WARNING, "Unable to set '%s' to linear format (write)\n", chan->name);
- free(chan->music_state);
- chan->music_state = NULL;
- } else {
- if (option_verbose > 2)
- ast_verbose(VERBOSE_PREFIX_3 "Started music on hold, class '%s', on %s\n", class->name, chan->name);
- }
+ if (option_verbose > 2)
+ ast_verbose(VERBOSE_PREFIX_3 "Started music on hold, class '%s', on %s\n", class->name, chan->name);
}
return chan->music_state;