Skip to content

Commit 1386273

Browse files
authored
Merge branch 'working' into master
2 parents 5b1e63c + f2fa80f commit 1386273

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

rtsp.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,8 +392,11 @@ def do_setup(self, track_id_str=None, headers={}):
392392
if self._auth:
393393
headers['Authorization'] = self._auth
394394
headers['Transport'] = self._get_transport_type()
395-
# If a string is supplied, it must contain the proceeding '/'
396395
if isinstance(track_id_str,str):
396+
if track_id_str.startswith(self._orig_url):
397+
track_id_str = track_id_str.lstrip(self._orig_url)
398+
elif not track_id_str.startswith('/') and not track_id_str == '':
399+
track_id_str = '/' + track_id_str
397400
self._sendmsg('SETUP', self._orig_url + track_id_str, headers)
398401
elif isinstance(track_id_str, int):
399402
self._sendmsg('SETUP', self._orig_url +

0 commit comments

Comments
 (0)