sdp_audio_codecs_from_speech_codec_list: add all matches

Change-Id: Idd24d5e57f75e413c7027d34e1e2eb00b7c8f113
This commit is contained in:
Neels Hofmeyr 2024-01-19 06:01:50 +01:00
parent c2e4bfc585
commit cb0758d4ba
1 changed files with 7 additions and 5 deletions

View File

@ -503,11 +503,13 @@ void sdp_audio_codecs_from_speech_codec_list(struct sdp_audio_codecs *ac, const
int i; int i;
for (i = 0; i < cl->len; i++) { for (i = 0; i < cl->len; i++) {
const struct gsm0808_speech_codec *sc = &cl->codec[i]; const struct gsm0808_speech_codec *sc = &cl->codec[i];
const struct codec_mapping *m = codec_mapping_by_gsm0808_speech_codec(sc); const struct codec_mapping *m;
if (!m)
continue; codec_mapping_foreach (m) {
sdp_audio_codecs_add_copy(ac, &m->sdp); if (!codec_mapping_matches_gsm0808_speech_codec(m, sc))
/* FIXME: for AMR, apply sc->cfg to the added codec's fmtp */ continue;
sdp_audio_codecs_add_copy(ac, &m->sdp);
}
} }
} }