diff --git a/daemon/codec.c b/daemon/codec.c index d1179aaaf..99594fdc4 100644 --- a/daemon/codec.c +++ b/daemon/codec.c @@ -4360,12 +4360,15 @@ static void codec_store_find_matching_codecs(GQueue *out_compat, struct rtp_payl struct rtp_payload_type *pt_parsed) { AUTO_CLEANUP_NULL(struct rtp_payload_type *pt_store, payload_type_destroy); - struct rtp_payload_type *pt; + struct rtp_payload_type *pt = NULL; if (pt_parsed) pt = pt_parsed; - else - pt = pt_store = codec_make_payload_type_sup(codec, cs->media); + else { + // parse out the codec params if any are given, otherwise just go with the name + if (str_chr(codec, '/')) + pt = pt_store = codec_make_payload_type_sup(codec, cs->media); + } GQueue *pts = g_hash_table_lookup(cs->codec_names, codec); if (pt) { diff --git a/t/auto-daemon-tests.pl b/t/auto-daemon-tests.pl index 3a7586b37..48ffb76a8 100755 --- a/t/auto-daemon-tests.pl +++ b/t/auto-daemon-tests.pl @@ -534,13 +534,13 @@ v=0 o=- 1545997027 1 IN IP4 198.51.100.4 s=tester t=0 0 -m=audio PORT RTP/AVP 8 +m=audio PORT RTP/AVP 96 c=IN IP4 203.0.113.1 -a=rtpmap:8 PCMA/8000 +a=rtpmap:96 AMR-WB/16000 +a=fmtp:96 mode-set=3,4,5 a=sendrecv a=rtcp:PORT SDP -# ^ XXX maybe change this to allow for octet-align=any if not given?