diff --git a/daemon/sdp.c b/daemon/sdp.c index 280651d65..1383aac28 100644 --- a/daemon/sdp.c +++ b/daemon/sdp.c @@ -296,6 +296,7 @@ const str rtpe_instance_id = STR_CONST(__id_buf); /** * Declarations for inner functions/helpers. */ +static struct sdp_attr *sdp_attr_dup(const struct sdp_attribute *c); static void attr_free(struct sdp_attribute *p); static void attr_insert(struct sdp_attributes *attrs, struct sdp_attribute *attr); INLINE void chopper_append_c(struct sdp_chopper *c, const char *s); @@ -1519,8 +1520,11 @@ static int __rtp_payload_types(struct stream_params *sp, struct sdp_media *media q = attr_list_get_by_id(&media->attributes, ATTR_RTCP_FB); for (__auto_type ql = q ? q->head : NULL; ql; ql = ql->next) { attr = ql->data; - if (attr->rtcp_fb.payload_type == -1) - continue; + /* rtcp-fb attributes applied on all payload types, must be added via generic attributes */ + if (attr->rtcp_fb.payload_type == -1) { + struct sdp_attr *ac = sdp_attr_dup(attr); + t_queue_push_tail(&sp->generic_attributes, ac); + } GQueue *rq = g_hash_table_lookup_queue_new(ht_rtcp_fb, GINT_TO_POINTER(attr->rtcp_fb.payload_type), NULL); g_queue_push_tail(rq, &attr->rtcp_fb.value); } @@ -2576,8 +2580,6 @@ static int process_media_attributes(struct sdp_chopper *chop, struct sdp_media * goto strip; break; case ATTR_RTCP_FB: - if (attr->rtcp_fb.payload_type == -1) - break; // leave this one alone if (media->codecs.codec_prefs.length > 0) goto strip; break; diff --git a/t/auto-daemon-tests.pl b/t/auto-daemon-tests.pl index 3a2a8146c..390e368ca 100755 --- a/t/auto-daemon-tests.pl +++ b/t/auto-daemon-tests.pl @@ -178,10 +178,6 @@ a=rtcp:PORT m=video PORT RTP/AVP 99 97 126 123 b=TIAS:5952000 a=label:11 -a=rtcp-fb:* ccm pan -a=rtcp-fb:* nack pli -a=rtcp-fb:* ccm fir -a=rtcp-fb:* ccm tmmbr a=mid:2 a=rtpmap:99 H265/90000 a=fmtp:99 level-id=90;max-lsr=125337600;max-lps=2088960;max-tr=22;max-tc=20;max-fps=6000;x-cisco-hevc=529 @@ -191,6 +187,10 @@ a=rtpmap:126 H264/90000 a=fmtp:126 profile-level-id=428016;packetization-mode=1;max-mbps=490000;max-fs=8160;max-cpb=200;max-dpb=16320;max-br=5000;max-smbps=490000;max-fps=6000 a=rtpmap:123 X-ULPFECUC/90000 a=fmtp:123 multi_ssrc=1;feedback=0;max_esel=1450;m=8;max_n=42;FEC_ORDER=FEC_SRTP;non_seq=1 +a=rtcp-fb:* ccm pan +a=rtcp-fb:* nack pli +a=rtcp-fb:* ccm fir +a=rtcp-fb:* ccm tmmbr a=answer:full a=extmap:4 http://protocols.cisco.com/timestamp#100us a=cisco-mari-psre:97 ltrf=3 @@ -24714,9 +24714,9 @@ c=IN IP4 198.51.100.1 t=0 0 m=audio PORT RTP/AVP 0 c=IN IP4 203.0.113.1 -a=rtcp-fb:* foobar a=rtpmap:0 PCMU/8000 a=rtcp-fb:0 blah +a=rtcp-fb:* foobar a=sendrecv a=rtcp:PORT SDP @@ -24764,8 +24764,8 @@ s=tester c=IN IP4 203.0.113.1 t=0 0 m=audio PORT RTP/AVPF 0 -a=rtcp-fb:* foobar a=rtpmap:0 PCMU/8000 +a=rtcp-fb:* foobar a=sendrecv a=rtcp:PORT SDP @@ -24867,8 +24867,8 @@ s=tester c=IN IP4 203.0.113.1 t=0 0 m=audio PORT RTP/AVPF 0 -a=rtcp-fb:* foobar a=rtpmap:0 PCMU/8000 +a=rtcp-fb:* foobar a=sendrecv a=rtcp:PORT SDP @@ -24899,8 +24899,8 @@ s=tester c=IN IP4 203.0.113.1 t=0 0 m=audio PORT RTP/AVP 0 -a=rtcp-fb:* foobar a=rtpmap:0 PCMU/8000 +a=rtcp-fb:* foobar a=sendrecv a=rtcp:PORT SDP @@ -24920,8 +24920,8 @@ s=tester c=IN IP4 203.0.113.1 t=0 0 m=audio PORT RTP/AVPF 0 -a=rtcp-fb:* foobar a=rtpmap:0 PCMU/8000 +a=rtcp-fb:* foobar a=sendrecv a=rtcp:PORT SDP