diff options
author | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-02-19 22:23:04 +0000 |
---|---|---|
committer | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-02-19 22:23:04 +0000 |
commit | fecba4625093c0008873129a5bf78cf3c1a973dc (patch) | |
tree | c924ccc3cc7dc0bf0d8891ca8fd2a62d39b18aad | |
parent | 86f27cdaa4ae0036a24cfacb6a79eef4ea072cd6 (diff) |
Maybe we should set the value before we test it? Fixes an issue people have been seeing (unreported?) with file playback not working.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@103831 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | main/channel.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/main/channel.c b/main/channel.c index 830775fd8..cece084fb 100644 --- a/main/channel.c +++ b/main/channel.c @@ -3095,13 +3095,14 @@ static int set_format(struct ast_channel *chan, int fmt, int *rawformat, int *fo int native; int res; + native = chan->nativeformats; + if (!fmt || !native) /* No audio requested */ return 0; /* Let's try a call without any sounds (video, text) */ /* Make sure we only consider audio */ fmt &= AST_FORMAT_AUDIO_MASK; - native = chan->nativeformats; /* Find a translation path from the native format to one of the desired formats */ if (!direction) /* reading */ |