diff options
author | Sean Bright <sean@malleable.com> | 2014-03-18 11:52:15 +0000 |
---|---|---|
committer | Sean Bright <sean@malleable.com> | 2014-03-18 11:52:15 +0000 |
commit | 83570270803ff5d82c700f0a5c887297a57b4a86 (patch) | |
tree | fac104e185a5038ea5e1d7a46d02f408693896ce /res/res_fax_spandsp.c | |
parent | 614b6abc38f2e87f45237e202a3960cf498225d0 (diff) |
res_fax_spandsp: Use g711_free() when available.
Per Johann Steinwendtner on the asterisk-dev mailing list:
http://lists.digium.com/pipermail/asterisk-dev/2014-March/066102.html
g711_free() was introduced in spandsp 0.0.6pre4 and g711_release() became a
noop. I opted not to remove the call to g711_release() since it is harmless
and to call g711_free() if we have a sufficiently recent version of spandsp.
(issue ASTERISK-20149)
Reported by: Alexandr Gordeev
........
Merged revisions 410829 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 410830 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410831 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_fax_spandsp.c')
-rw-r--r-- | res/res_fax_spandsp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/res/res_fax_spandsp.c b/res/res_fax_spandsp.c index a7d4b015f..1ddf566ca 100644 --- a/res/res_fax_spandsp.c +++ b/res/res_fax_spandsp.c @@ -677,6 +677,9 @@ static int spandsp_v21_detect(struct ast_fax_session *s, const struct ast_frame ast_debug(5, "spandsp transcoding frame from %s to slinear for v21 detection\n", (f->subclass.format.id == AST_FORMAT_ALAW ? "G711_ALAW" : "G711_ULAW")); modem_connect_tones_rx(p->tone_state, slndata, f->samples); g711_release(decoder); +#if SPANDSP_RELEASE_DATE >= 20090220 + g711_free(decoder); +#endif ast_free(slndata); /* frame in other formats cannot be passed to spandsp, it could cause segfault */ |