diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-07-27 02:43:49 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-07-27 02:43:49 +0000 |
commit | d50957552268bf92841436956c99020e8d2e19fe (patch) | |
tree | 9d1857d2cda82631945a32e39cc09764a8e082ef /channel.c | |
parent | 625c87d9440b8e139bee36efe7112038c664253a (diff) |
don't do useless translation destroy/build when the channel is already in the correct format
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@38310 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channel.c')
-rw-r--r-- | channel.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -2328,6 +2328,10 @@ static int set_format(struct ast_channel *chan, int fmt, int *rawformat, int *fo int native; int res; + /* if already in the desired format nothing to do here */ + if (*format == fmt) + return 0; + native = chan->nativeformats; /* Find a translation path from the native format to one of the desired formats */ if (!direction) |