add libosmo-sdp: add codec_list_is_empty()

Change-Id: I5e80f5737f22dc81ac16448fc59937330d24432e
This commit is contained in:
Neels Hofmeyr
2024-02-22 19:51:59 +01:00
parent aca4ad4cce
commit 53877bfb8e
2 changed files with 8 additions and 0 deletions

View File

@@ -66,3 +66,4 @@ void osmo_sdp_codec_list_intersection(struct osmo_sdp_codec_list *dst, const str
bool translate_payload_type_numbers);
struct osmo_sdp_codec *osmo_sdp_codec_list_by_payload_type(struct osmo_sdp_codec_list *codec_list, int8_t payload_type);
bool osmo_sdp_codec_list_is_empty(const struct osmo_sdp_codec_list *codec_list);

View File

@@ -358,3 +358,10 @@ struct osmo_sdp_codec *osmo_sdp_codec_list_by_payload_type(struct osmo_sdp_codec
}
return NULL;
}
bool osmo_sdp_codec_list_is_empty(const struct osmo_sdp_codec_list *codec_list)
{
if (!codec_list)
return true;
return llist_empty(&codec_list->list);
}