[Asterisk-code-review] translate.c: Take sampling rate into account when checking codec's bu... (asterisk[master])

Sean Bright asteriskteam at digium.com
Thu Apr 22 08:19:50 CDT 2021


Sean Bright has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/15801 )

Change subject: translate.c: Take sampling rate into account when checking codec's buffer size
......................................................................


Patch Set 1:

(1 comment)

https://gerrit.asterisk.org/c/asterisk/+/15801/1/main/translate.c 
File main/translate.c:

https://gerrit.asterisk.org/c/asterisk/+/15801/1/main/translate.c@418 
PS1, Line 418: src_srate
> I think a check for src_rate being 0 is warranted to prevent a divide by 0 error.

Aren't these (codec.sample_rate) set at compile time? If so, maybe an ast_assert() would be better?

Also, throw some spaces around that /



-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/15801
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I9aebe2f8788e00321a7f5c47aa97c617f39e9055
Gerrit-Change-Number: 15801
Gerrit-PatchSet: 1
Gerrit-Owner: Jean Aunis - Prescom <jean.aunis at prescom.fr>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-CC: Sean Bright <sean at seanbright.com>
Gerrit-Comment-Date: Thu, 22 Apr 2021 13:19:50 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: George Joseph <gjoseph at digium.com>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20210422/20c21cb4/attachment.html>


More information about the asterisk-code-review mailing list