[asterisk-dev] [Code Review] 4260: media: Fix crash when determining sample count of a frame during shutdown
Kevin Harwell
reviewboard at asterisk.org
Fri Dec 12 09:38:54 CST 2014
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4260/#review13956
-----------------------------------------------------------
Ship it!
Ship It!
- Kevin Harwell
On Dec. 12, 2014, 9:03 a.m., Joshua Colp wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/4260/
> -----------------------------------------------------------
>
> (Updated Dec. 12, 2014, 9:03 a.m.)
>
>
> Review request for Asterisk Developers.
>
>
> Bugs: ASTERISK-24604
> https://issues.asterisk.org/jira/browse/ASTERISK-24604
>
>
> Repository: Asterisk
>
>
> Description
> -------
>
> When shutting down Asterisk the codecs are cleaned up. As a result anything attempting to get a codec based on ID or details will find that no codec exists. This currently occurs when determining the sample count of a frame. This code did not take this situation into account.
>
> This change fixes this by getting the codec directly from the format and eliminates the lookup. This is both faster and also provides a guarantee that the codec will exist and will be valid.
>
>
> Diffs
> -----
>
> /branches/13/main/format.c 429406
> /branches/13/main/codec.c 429406
> /branches/13/include/asterisk/format.h 429406
>
> Diff: https://reviewboard.asterisk.org/r/4260/diff/
>
>
> Testing
> -------
>
> Ran some normal calls to ensure no regression. Also did some restarts/shutdowns but due to the raceyness of this it is generally hard to reproduce for me.
>
>
> Thanks,
>
> Joshua Colp
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20141212/22b73a64/attachment.html>
More information about the asterisk-dev
mailing list