[Asterisk-code-review] translate: Provide translation modules the result of SDP neg... (asterisk[master])

Joshua Colp asteriskteam at digium.com
Wed Nov 11 07:23:34 CST 2015


Joshua Colp has posted comments on this change.

Change subject: translate: Provide translation modules the result of SDP negotiation.
......................................................................


Patch Set 1: Code-Review-1

(2 comments)

https://gerrit.asterisk.org/#/c/1598/1/main/translate.c
File main/translate.c:

Line 335: 	pvt->f.subclass.format = ao2_bump(format);
This changes the contract of the newpvt callback. Previously newpvt never expected there to be a format in the pvt frame. Now there could be. It is unlikely that callback implementations are coded to handle this for cases where it is done.


Line 488: 		if ((t->dst_codec.sample_rate != ast_format_get_sample_rate(dst)) || (strcmp(t->dst_codec.name, ast_format_get_name(dst)))) {
This is incomplete. You need to check name, type, and sample rate. You could also move this logic into newpvt itself where it sets the format if the translator has not provided one.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Id6878a989b50573298dab115d3371ea369e1a718
Gerrit-PatchSet: 1
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-HasComments: Yes



More information about the asterisk-code-review mailing list