rtspsrc: wrong location constructed for SETUP request when content_base is provided
I have an IP camera that provides content_base
information in reply to DESCRIBE request with a path portion but without the trailing "/".
HTTP-Header of camera's reply:
CSeq: 3
Server: Rtsp Server 2304*1296*15*4096
Content-Type: application/sdp
Content-length: 390
Content-Base: rtsp://192.168.31.168/0
When gstrtspsrc.c creates SETUP request, content_base
and relative control_path
information are joined:
base = "rtsp://192.168.31.168/0"
control_path = "trackID=0"
stream->conninfo.location = gst_uri_join_strings (base, control_path)
-> rtsp://192.168.31.168/trackID=0 (wrong)
Whereas a base path with a trailing "/" results in a correct location:
base = "rtsp://192.168.31.168/0/"
control_path = "trackID=0"
stream->conninfo.location = gst_uri_join_strings (base, control_path)
-> rtsp://192.168.31.168/0/trackID=0
Appending a "/" to content_base
when receiving it in gst_rtspsrc_create_stream()
seems sufficient to me. But I don't know if this is a general solution or has other effects.