rgaufman / live555

A mirror of the live555 source code.
GNU Lesser General Public License v3.0
745 stars 366 forks source link

RTSPServer::registerStream() receiving DESCRIBE request in REGISTER's success response (200 OK) from Proxy Server #10

Closed durgesh-tanuku closed 2 years ago

durgesh-tanuku commented 6 years ago

Description :

We are using live555 library (proxyServer) for proxying the back-end Camera streams to end clients in one of our applications.

Recently I was trying to write a Camera simulation application (using live555 2017.09.12) to test our Proxy Server. This Camera simulation app Registers an RTSP stream (generated from local video file) with our Proxy Server application. I have implemented this code referring to testOnDemandRTSPServer.cpp. This code is working fine.

But occassionally stream is not getting registered properly with the Proxy Server. With the help of tcpdump and additional logs, I have found that Camera simulation app received DESCRIBE request along with response to REGISTER request. Below is the corresponding log that printed contents of fResponseBuffer during Registration failure.

fResponseBuffer :

RTSP/1.0 200 OK CSeq: 3 Date: Thu, Oct 12 2017 14:56:02 GMT

DESCRIBE rtsp://10.0.1.163:8554/matroskaFileTest RTSP/1.0 CSeq: 2 User-Agent: Video Framework Accept: application/sdp

Because of this, DESCRIBE request is not processed by Camera simulation app and Registration is getting failed some times.

Steps to reproduce :

Register a stream (generated using sms object in testOnDemandRTSPServer.cpp) to proxy server using RTSPServer::registerStream(). Then run this binary (testOnDemandRTSPServer) in several times. Occassionally REGISTRATION would fail because of this issue. This can be confirmed by printing contents of fResponseBuffer in RTSPClient::handleResponseBytes().