aboutsummaryrefslogtreecommitdiffstats
path: root/codecs
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-10-18 15:45:55 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-10-18 15:45:55 +0000
commita0de9049cbb2669cb72dd156c76a70385c86aa11 (patch)
tree999d4e30c8b90ab421f435c75d590a0f28c56538 /codecs
parent72c93651b0a1f1f1c7bc68916c14966b843e5272 (diff)
Execute the RELEASE operation on transcoder channels in the destroy callback.
(patch from jsloan) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@86296 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'codecs')
-rw-r--r--codecs/codec_zap.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/codecs/codec_zap.c b/codecs/codec_zap.c
index 4989446ea..717b260e9 100644
--- a/codecs/codec_zap.c
+++ b/codecs/codec_zap.c
@@ -218,6 +218,11 @@ static struct ast_frame *zap_frameout(struct ast_trans_pvt *pvt)
static void zap_destroy(struct ast_trans_pvt *pvt)
{
struct pvt *ztp = pvt->pvt;
+ unsigned int x;
+
+ x = ZT_TCOP_RELEASE;
+ if (ioctl(ztp->fd, ZT_TRANSCODE_OP, &x))
+ ast_log(LOG_WARNING, "Failed to release transcoder channel: %s\n", strerror(errno));
ast_atomic_fetchadd_int(&channels.total, -1);
switch (ztp->hdr->dstfmt) {