Skip to content

Commit 3f344cb

Browse files
committed
rearrange setup logic
1 parent 0d17fbf commit 3f344cb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rtsp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,10 +426,10 @@ def do_setup(self, track_id_str=None, headers={}):
426426
headers['Authorization'] = self._auth
427427
headers['Transport'] = self._get_transport_type()
428428
if isinstance(track_id_str,str):
429-
if not track_id_str.startswith('/') and not track_id_str == '':
430-
track_id_str = '/' + track_id_str
431429
if track_id_str.startswith(self._orig_url):
432430
track_id_str = track_id_str.lstrip(self._orig_url)
431+
elif not track_id_str.startswith('/') and not track_id_str == '':
432+
track_id_str = '/' + track_id_str
433433
self._sendmsg('SETUP', self._orig_url + track_id_str, headers)
434434
elif isinstance(track_id_str, int):
435435
self._sendmsg('SETUP', self._orig_url +

0 commit comments

Comments
 (0)