Skip to content

rtspsrc: Fix usage of IPv6 connections in SETUP

If the SETUP request returns an IPv6 server address in the Transport field, we would generate an incorrect URI, and multiudpsink would fail to initialize:

     rtspsrc gstrtspsrc.c:9780:dump_key_value:<source>    key: 'Transport', value: 'RTP/AVP;unicast;source=fe80::dc27:25ff:fe5e:bd13:8080;client_port=62696-62697;server_port=4000-4001'
...
     rtspsrc gstrtspsrc.c:4595:gst_rtspsrc_stream_configure_udp_sinks:<source> configure RTP UDP sink for fe80::dc27:25ff:fe5e:bd13:8080:4000
...
multiudpsink gstmultiudpsink.c:1229:gst_multiudpsink_configure_client:<udpsink0> error: Invalid address family (got 23)

We can't look at stream->is_ipv6 because we can't rely on the server returning the right value there. In the issue reported about this, server reported itself as KuP RTSP Server/0.1, and the SDP was:

c=IN IP4
m=video 54608 RTP/AVP 96
a=rtpmap:96 H264/90000

So we need to parse the string value and figure out the family ourselves.

Fixes #1058 (closed)

Fixes gst-plugins-good#830 (closed)

Edited by Nirbheek Chauhan

Merge request reports

Loading