RealPlayer disconnect as a result of a SETUP response

Login to reply to this topic.
Mon, 2008-01-07 12:36
Joined: 2008-01-07
Forum posts: 2

Hello all,

I'm developing a streaming server which support minimal RTSP commands.
The purpose is to sent mp4 video stream to N95 mobile phone so it can play it.

I've ran a Darwin server on my PC and was able to stream it's samples into the N95 RealPlayer, I then tried using my own RTSP implementation, in which I managed to receive and reply to OPTION and DESCRIBE request, but when replying to SETUP RealPlayer have stopped indicating that the server had closed the connection.

I've tried it with a RealPlayer on my PC (openSUSE 10.2) and did not encounter that problem.
Same thing with VLC client.

Bellow is my RTSP SETUP reply, if you have any idea or suggestion please send it back.

RTSP/1.0 200 OK
Server: DSS/5.5.5 (Build/489.16; Platform/Win32; Release/Darwin; state/beta; )
CSeq: 3
Last-Modified: Mon, 07 Mar 2005 14:02:10 GMT
Cache-Control: must-revalidate
Session: 399131105155
Date: 7 Jan 2008 12:25:38 Jerusalem Standard Time
Expires: 7 Jan 2008 12:25:38 Jerusalem Standard Time
Transport: RTP/AVP;unicast;mode=play;source=192.168.1.88;client_port=22698-22699;server_port=6970-6971;ssrc=000018be

Thanks Ravid


Mon, 2008-01-07 14:39
Joined: 2008-01-07
Forum posts: 2
Re: RealPlayer disconnect as a result of a SETUP response

I found the cause. and it's my bad.

When sending the DESCRIBE response I calculated the content-length and added CRLF (\r\n) after the content. The client read up to content length leaving the CRLF in the socket buffer, only when the next packet arrived it read the CRLF and misinterpret them as session disconnection.

  • Login to reply to this topic.