[Asterisk-code-review] translate: Fix transcoding while different in frame size. (asterisk[master])

Richard Mudgett asteriskteam at digium.com
Fri Sep 11 11:12:12 CDT 2015


Richard Mudgett has posted comments on this change.

Change subject: translate: Fix transcoding while different in frame size.
......................................................................


Patch Set 3:

(11 comments)

https://gerrit.asterisk.org/#/c/1154/3/codecs/codec_gsm.c
File codecs/codec_gsm.c:

Line 148: 		struct ast_frame *current = NULL;
Current doesn't need to be initialized to NULL since the first reference is an assignment.

Also please put a blank line after this declaration so declarations are separated from code.


Line 165: 	if (samples) {
This should be:
if (samples && pvt->samples)

We need to test samples for non-zero to indicate that we pulled at least one frame out of tmp->buf and test pvt->samples for non-zero to see if any samples remain in the buffer.


https://gerrit.asterisk.org/#/c/1154/3/codecs/codec_ilbc.c
File codecs/codec_ilbc.c:

Line 159: 		struct ast_frame *current = NULL;
Same here


Line 166: 		iLBC_encode( (ilbc_bytes*)pvt->outbuf.BUF_TYPE, tmpf, &tmp->enc);
Guidelines on spacing for parameters and the cast.
iLBC_encode((ilbc_bytes *) pvt->outbuf.BUF_TYPE,...


Line 181: 	if (samples) {
Same here


https://gerrit.asterisk.org/#/c/1154/3/codecs/codec_lpc10.c
File codecs/codec_lpc10.c:

Line 169: 		struct ast_frame *current = NULL;
current doesn't need to be initialized to NULL.


Line 196: 	if (samples) {
Same here


https://gerrit.asterisk.org/#/c/1154/3/codecs/codec_speex.c
File codecs/codec_speex.c:

Line 268: 		struct ast_frame *current = NULL;
current doesn't need to be initialized to NULL.


Line 269: 		int is_speech=1;
Guidelines.  Spaces around =


Line 308: 		} else if (!tmp->silent_state) {
I don't think there should be an else-if test and just an else.


Line 335: 	if (samples) {
same here


-- 
To view, visit https://gerrit.asterisk.org/1154
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I2e229569d73191d66a4e43fef35432db24000212
Gerrit-PatchSet: 3
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Reviewer: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list