----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviewboard.asterisk.org/r/3783/#review12635 -----------------------------------------------------------
I've been working on a patch that makes very similar changes for partly this reason. /team/group/media_formats-reviewed-trunk/main/translate.c <https://reviewboard.asterisk.org/r/3783/#comment22910> put curlies /team/group/media_formats-reviewed-trunk/main/translate.c <https://reviewboard.asterisk.org/r/3783/#comment22911> Is there a particular reason you are moving this code here? /team/group/media_formats-reviewed-trunk/main/translate.c <https://reviewboard.asterisk.org/r/3783/#comment22913> Put a module unref here when move the module ref to before this if test. /team/group/media_formats-reviewed-trunk/main/translate.c <https://reviewboard.asterisk.org/r/3783/#comment22912> Move this line to before the t->newpvt() call. The destroy() unrefs the module. - rmudgett On July 14, 2014, 2:04 p.m., Joshua Colp wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviewboard.asterisk.org/r/3783/ > ----------------------------------------------------------- > > (Updated July 14, 2014, 2:04 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 > ----- > > /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 > >
-- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-dev mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev