[asterisk-dev] [Code Review] 3783: media formats: Fix double unref and allow translators to control output format

Joshua Colp reviewboard at asterisk.org
Mon Jul 14 16:57:09 CDT 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3783/
-----------------------------------------------------------

(Updated July 14, 2014, 9:57 p.m.)


Review request for Asterisk Developers.


Repository: Asterisk


Description
-------

The codec_resample module is special in that it wants to control the format placed on the output frame. This was not achievable as the format would get overwritten as soon as the resample instance was initialized. The translation core now gives priority to translator implementations and falls back to finding or creating a format if that fails. The codec_resample module also assumed it had to release the format reference when in reality this is done by the translation core itself.


Diffs (updated)
-----

  /team/group/media_formats-reviewed-trunk/main/translate.c 418611 
  /team/group/media_formats-reviewed-trunk/codecs/codec_resample.c 418611 

Diff: https://reviewboard.asterisk.org/r/3783/diff/


Testing
-------

Before patch: Placed an outbound call and had it recorded using MixMonitor. Hung up and saw that a format had been double freed.
After patch: Placed an outbound call and had it recorded using MixMonitor. Hung up and saw normal termination.


Thanks,

Joshua Colp

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140714/7cee936f/attachment-0001.html>


More information about the asterisk-dev mailing list