From: Russell Bryant Date: Thu, 18 Oct 2007 15:45:55 +0000 (+0000) Subject: Execute the RELEASE operation on transcoder channels in the destroy callback. X-Git-Tag: 1.4.14~127 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f5fd6e1cb16cc8ae3d483855df4391a0feb509f8;p=thirdparty%2Fasterisk.git Execute the RELEASE operation on transcoder channels in the destroy callback. (patch from jsloan) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@86296 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/codecs/codec_zap.c b/codecs/codec_zap.c index 4989446eaa..717b260e9a 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) {