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

Richard Mudgett asteriskteam at digium.com
Fri Sep 11 16:49:41 CDT 2015


Richard Mudgett has posted comments on this change.

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


Patch Set 5: Code-Review-1

(6 comments)

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

Line 155: 		current = ast_trans_frameout(pvt, GSM_FRAME_LEN, GSM_SAMPLES);
ast_trans_frame() can return NULL on failure to allocate a frame.  Need to add a NULL check.

if (!current) }
  continue;
}


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

Line 171: 		current = ast_trans_frameout(pvt, ILBC_FRAME_LEN, ILBC_SAMPLES);
ast_trans_frame() can return NULL on failure to allocate a frame.  Need to add a NULL check.

if (!current) }
  continue;
}


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

Line 186: 		current = ast_trans_frameout(pvt, LPC10_BYTES_IN_COMPRESSED_FRAME, LPC10_SAMPLES_PER_FRAME);
ast_trans_frame() can return NULL on failure to allocate a frame.  Need to add a NULL check.

if (!current) }
  continue;
}


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

Line 327: 
        : 		if (last) {
ast_trans_frame() and ast_frisolate() can return NULL on failure to allocate a frame.  Need to add a NULL check before trying to add the current frame to the list.

if (!current) }
  continue;
}


https://gerrit.asterisk.org/#/c/1154/5/main/translate.c
File main/translate.c:

Line 567: 			while (current) {
Hmm.  Speex could conceivably stick an AST_FRAME_CNG anywhere in the translated frame list so we need to take that into account in the loop.


Line 573: 				path->nextout = ast_tvadd(path->nextout, ast_samp2tv(
        : 				 current->samples, ast_format_get_sample_rate(current->subclass.format)));
Line continuation needs to be indented by one tab.  It seems to be only indented by one space 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: 5
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