Fixes RTSP session id parsing issue. (#39)

* Fixes RTSP session id parsing issue.

* Pull Request #39 changes requested.
This commit is contained in:
Chandler Lattin 2018-12-14 19:53:28 -05:00 committed by Cameron Gutman
parent 80eba25bb9
commit 0006beb32b

View File

@ -579,12 +579,20 @@ int performRtspHandshake(void) {
}
sessionId = getOptionContent(response.options, "Session");
if (sessionId == NULL) {
Limelog("RTSP SETUP streamid=audio is missing session attribute");
ret = -1;
goto Exit;
}
// Given there is a non-null session id, get the
// first token of the session until ";", which
// resolves any 454 session not found errors on
// standard RTSP server implementations.
// (i.e - sessionId = "DEADBEEFCAFE;timeout = 90")
sessionId = strtok(sessionId, ";");
strcpy(sessionIdString, sessionId);
hasSessionId = 1;