Make function amr_is_octet_aligned publicly available
it will be used by mgcp_iuup.c in follow-up patch. Change-Id: Iffaf90c1f713feef0c609a7581a346f5f28141d9
This commit is contained in:
parent
fed5feafd3
commit
2799ff9bb9
|
@ -17,3 +17,4 @@ int mgcp_codec_decide(struct mgcp_conn_rtp *conn);
|
||||||
int mgcp_codec_pt_translate(struct mgcp_conn_rtp *conn_src, struct mgcp_conn_rtp *conn_dst, int payload_type);
|
int mgcp_codec_pt_translate(struct mgcp_conn_rtp *conn_src, struct mgcp_conn_rtp *conn_dst, int payload_type);
|
||||||
const struct mgcp_rtp_codec *mgcp_codec_pt_find_by_subtype_name(struct mgcp_conn_rtp *conn,
|
const struct mgcp_rtp_codec *mgcp_codec_pt_find_by_subtype_name(struct mgcp_conn_rtp *conn,
|
||||||
const char *subtype_name, unsigned int match_nr);
|
const char *subtype_name, unsigned int match_nr);
|
||||||
|
bool mgcp_codec_amr_is_octet_aligned(const struct mgcp_rtp_codec *codec);
|
||||||
|
|
|
@ -355,7 +355,7 @@ int mgcp_codec_decide(struct mgcp_conn_rtp *conn)
|
||||||
*
|
*
|
||||||
* https://tools.ietf.org/html/rfc4867
|
* https://tools.ietf.org/html/rfc4867
|
||||||
*/
|
*/
|
||||||
static bool amr_is_octet_aligned(const struct mgcp_rtp_codec *codec)
|
bool mgcp_codec_amr_is_octet_aligned(const struct mgcp_rtp_codec *codec)
|
||||||
{
|
{
|
||||||
if (!codec->param_present)
|
if (!codec->param_present)
|
||||||
return false;
|
return false;
|
||||||
|
@ -379,7 +379,7 @@ static bool codecs_same(struct mgcp_rtp_codec *codec_a, struct mgcp_rtp_codec *c
|
||||||
if (strcmp(codec_a->subtype_name, codec_b->subtype_name))
|
if (strcmp(codec_a->subtype_name, codec_b->subtype_name))
|
||||||
return false;
|
return false;
|
||||||
if (!strcmp(codec_a->subtype_name, "AMR")) {
|
if (!strcmp(codec_a->subtype_name, "AMR")) {
|
||||||
if (amr_is_octet_aligned(codec_a) != amr_is_octet_aligned(codec_b))
|
if (mgcp_codec_amr_is_octet_aligned(codec_a) != mgcp_codec_amr_is_octet_aligned(codec_b))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue