pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/29863 )
Change subject: mgw: reuse mgcp_codec_amr_mode_is_indicated() in mgcp_codec_amr_is_octet_aligned() ...................................................................... mgw: reuse mgcp_codec_amr_mode_is_indicated() in mgcp_codec_amr_is_octet_aligned() mgcp_codec_amr_mode_is_indicated() has an extra check validating the subtype is AMR, which is fine for all the callers of mgcp_codec_amr_is_octet_aligned() (mgcp_iuup.c): mgcp_conn_iuup_send_rtp: conn_rtp_src is explictly checked to be AMR just before calling the function. bridge_iuup_to_rtp_peer: conn_rtp_dst is expected to be an RTP_DEFAULT conn using AMR. Change-Id: I4c18510b59fd917ed033393994b21517bf753510 --- M src/libosmo-mgcp/mgcp_codec.c 1 file changed, 1 insertion(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/63/29863/1 diff --git a/src/libosmo-mgcp/mgcp_codec.c b/src/libosmo-mgcp/mgcp_codec.c index 184ca43..849b0c8 100644 --- a/src/libosmo-mgcp/mgcp_codec.c +++ b/src/libosmo-mgcp/mgcp_codec.c @@ -369,9 +369,7 @@ */ bool mgcp_codec_amr_is_octet_aligned(const struct mgcp_rtp_codec *codec) { - if (!codec->param_present) - return false; - if (!codec->param.amr_octet_aligned_present) + if (!mgcp_codec_amr_mode_is_indicated(codec)) return false; return codec->param.amr_octet_aligned; } -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29863 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I4c18510b59fd917ed033393994b21517bf753510 Gerrit-Change-Number: 29863 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pes...@sysmocom.de> Gerrit-MessageType: newchange