aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2022-08-06 17:39:58 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2022-08-07 02:12:14 +0200
commit6dca903ded4901a8ef06c08a83b8ee064a2f7797 (patch)
tree220da4c630f2933456ca4c8ec801da19e4b313b9
parent836aec41051c1197f37811061ec440b0056f9832 (diff)
codec_filter fu
-rw-r--r--src/libmsc/codec_filter.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libmsc/codec_filter.c b/src/libmsc/codec_filter.c
index da47b735f..199ef7111 100644
--- a/src/libmsc/codec_filter.c
+++ b/src/libmsc/codec_filter.c
@@ -124,7 +124,7 @@ int codec_filter_run(struct codec_filter *codec_filter)
/* If osmo-msc were able to trigger a re-assignment after the remote side has picked a codec mismatching the
* initial Assignment, then this code here would make sense: keep the other codecs as available to choose from,
* but put the currently assigned codec in the first position. */
- if (a->subtype_name[0]) {
+ if (sdp_audio_codec_is_set(a)) {
/* Assignment has completed, the chosen codec should be the first of the resulting SDP.
* Make sure this is actually listed in the result SDP and move to first place. */
struct sdp_audio_codec *select = sdp_audio_codec_by_descr(r, a);
@@ -152,7 +152,7 @@ int codec_filter_run(struct codec_filter *codec_filter)
* would also support, but the local side has already assigned a mismatching codec before. Mismatching codecs
* means call failure. So, currently, if locally, Assignment has already happened, it makes sense to send only
* the assigned codec as available choice to the remote side. */
- if (a->subtype_name[0]) {
+ if (sdp_audio_codec_is_set(a)) {
/* Assignment has completed, the chosen codec should be the the only possible one. */
struct sdp_audio_codecs assigned_codec = {};
sdp_audio_codecs_add_copy(&assigned_codec, a);
@@ -187,7 +187,7 @@ int codec_filter_to_str_buf(char *buf, size_t buflen, const struct codec_filter
OSMO_STRBUF_APPEND(sb, sdp_msg_to_str_buf, &codec_filter->remote);
}
- if (codec_filter->assignment.subtype_name[0]) {
+ if (sdp_audio_codec_is_set(&codec_filter->assignment)) {
OSMO_STRBUF_PRINTF(sb, " assigned=");
OSMO_STRBUF_APPEND(sb, sdp_audio_codec_to_str_buf, &codec_filter->assignment);
}