summaryrefslogtreecommitdiff
path: root/res/res_musiconhold.c
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2009-11-04 14:05:12 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2009-11-04 14:05:12 +0000
commitd8e0c584372c51b585a52efbe2375861bc09bdcf (patch)
treedd3bc244b8a45aacb932109dc8c12d1f21769d55 /res/res_musiconhold.c
parent6a50e7a031f4d424aa8bd3293aa48501f7b96652 (diff)
Expand codec bitfield from 32 bits to 64 bits.
Reviewboard: https://reviewboard.asterisk.org/r/416/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@227580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_musiconhold.c')
-rw-r--r--res/res_musiconhold.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c
index b5bc77d74..604ff300e 100644
--- a/res/res_musiconhold.c
+++ b/res/res_musiconhold.c
@@ -148,7 +148,7 @@ static int respawn_time = 20;
struct moh_files_state {
struct mohclass *class;
- int origwfmt;
+ format_t origwfmt;
int samples;
int sample_queue;
int pos;
@@ -180,7 +180,7 @@ struct mohclass {
int total_files;
unsigned int flags;
/*! The format from the MOH source, not applicable to "files" mode */
- int format;
+ format_t format;
/*! The pid of the external application delivering MOH */
int pid;
time_t start;
@@ -198,7 +198,7 @@ struct mohclass {
struct mohdata {
int pipe[2];
- int origwfmt;
+ format_t origwfmt;
struct mohclass *parent;
struct ast_frame f;
AST_LIST_ENTRY(mohdata) list;
@@ -235,7 +235,7 @@ static void moh_files_release(struct ast_channel *chan, void *data)
}
if (state->origwfmt && ast_set_write_format(chan, state->origwfmt)) {
- ast_log(LOG_WARNING, "Unable to restore channel '%s' to format '%d'\n", chan->name, state->origwfmt);
+ ast_log(LOG_WARNING, "Unable to restore channel '%s' to format '%s'\n", chan->name, ast_getformatname(state->origwfmt));
}
state->save_pos = state->pos;
@@ -773,7 +773,7 @@ static struct mohdata *mohalloc(struct mohclass *cl)
fcntl(moh->pipe[1], F_SETFL, flags | O_NONBLOCK);
moh->f.frametype = AST_FRAME_VOICE;
- moh->f.subclass = cl->format;
+ moh->f.subclass.codec = cl->format;
moh->f.offset = AST_FRIENDLY_OFFSET;
moh->parent = mohclass_ref(cl, "Reffing music class for mohdata parent");
@@ -789,7 +789,7 @@ static void moh_release(struct ast_channel *chan, void *data)
{
struct mohdata *moh = data;
struct mohclass *class = moh->parent;
- int oldwfmt;
+ format_t oldwfmt;
ao2_lock(class);
AST_LIST_REMOVE(&moh->parent->members, moh, list);