[MPlayer-dev-eng] rtsp illigal mrl

Yoshinori Sato ysato at users.sourceforge.jp
Sat Mar 20 13:14:45 CET 2004


I discovered the problem that it was returned Not Found than a server 
in order to illegal mrl to SETUP of RTSP with mplayer 1.0pre3.
And I discovered the problem that sequence number made a mistake in.

I attach log and a revision patch.

--- mplayer-1.0-pre3.orig/libmpdemux/realrtsp/rtsp.c
+++ mplayer-1.0-pre3/libmpdemux/realrtsp/rtsp.c
@@ -612,8 +612,8 @@
   s->server_state=0;
   s->server_caps=0;
   
-  s->cseq=0;
+  s->cseq=1;
   s->session=NULL;
   
   if (user_agent)
--- mplayer-1.0-pre3.orig/libmpdemux/network.c
+++ mplayer-1.0-pre3/libmpdemux/network.c
@@ -961,6 +961,8 @@
 		if(fd<0) return -1;
 		
 		mrl = malloc(sizeof(char)*(strlen(stream->streaming_ctrl->url->hostname)+strlen(stream->streaming_ctrl->url->file)+16));
+		if (stream->streaming_ctrl->url->file[0] == '/')
+			stream->streaming_ctrl->url->file ++;
 		sprintf(mrl,"rtsp://%s:%i/%s",stream->streaming_ctrl->url->hostname,port,stream->streaming_ctrl->url->file);
 		rtsp = rtsp_session_start(fd,&mrl, stream->streaming_ctrl->url->file,
 			stream->streaming_ctrl->url->hostname, port, &redirected);
-- 
Yoshinori Sato
<ysato at users.sourceforge.jp>

-------------- next part --------------
OPTIONS rtsp://real-od.stream.ne.jp:554 RTSP/1.0
CSeq: 1
User-Agent: RealMedia Player Version 6.0.9.1235 (linux-2.0-libc6-i386-gcc2.95)
ClientChallenge: 9e26d33f2984236010ef6253fb1887f7
PlayerStarttime: [28/03/2003:22:50:23 00:00]
CompanyID: KnKV4M4I/B2FjJ1TToLycw==
GUID: 00000000-0000-0000-0000-000000000000
RegionData: 0
ClientID: Linux_2.4_6.0.9.1235_play32_RN01_EN_586
Pragma: initiate-session

RTSP/1.0 200 OK
CSeq: 1
Date: Sat, 20 Mar 2004 19:55:55 JST
Public: OPTIONS, DESCRIBE, ANNOUNCE, SETUP, GET_PARAMETER, SET_PARAMETER, TEARDOWN
RealChallenge1: ac0fedc04ed8d1adbc88d30f7cb6a63c
Via: 1.0 Above2-NC2 (NetCache NetApp/5.3.1R4D8)

DESCRIBE rtsp://real-od.stream.ne.jp:554/vod/impress/video/KME/kurousagi/kurousagi0318.rm RTSP/1.0
Cseq: 2
Accept: application/sdp
Bandwidth: 10485800
GUID: 00000000-0000-0000-0000-000000000000
RegionData: 0
ClientID: Linux_2.4_6.0.9.1235_play32_RN01_EN_586
SupportsMaximumASMBandwidth: 1
Language: en-US
Require: com.real.retain-entity-for-setup

RTSP/1.0 200 OK
CSeq: 2
Date: Sat, 20 Mar 2004 19:55:55 JST
X-SplitterPort: 3030
X-MEIPort: 7878
X-TSPort: 7802
Last-Modified: Wed, 17 Mar 2004 07:13:08 GMT
ETag: 1362853220-1
Content-type: application/sdp
StatsMask: 3
Server: RealServer Version 8.0.2.471 (linux-2.0-libc6-i386)
Content-base: rtsp://real-od.stream.ne.jp:554/vod/impress/video/KME/kurousagi/kurousagi0318.rm/
Via: 1.0 Above2-NC2 (NetCache NetApp/5.3.1R4D8)
Content-Length: 2794
Session: 1362853220-1

v=0
o=- 1079507588 1079507588 IN IP4 211.13.231.123
s=KUROUSAGI NO KOBEYA #49
i=Konami Media Entertainment (C) Konami Media Entertainment
t=0 0
a=SdpplinVersion:1610643319
a=Flags:integer;11
a=IsRealDataType:integer;1
a=StreamCount:integer;1
a=Title:buffer;"S1VST1VTQUdJIE5PIEtPQkVZQSAjNDkA"
a=Copyright:buffer;"KEMpIEtvbmFtaSBNZWRpYSBFbnRlcnRhaW5tZW50AA=="
a=Author:buffer;"S29uYW1pIE1lZGlhIEVudGVydGFpbm1lbnQA"
a=range:npt=0-2220.197000
m=audio 0 RTP/AVP 101
b=AS:65
a=control:streamid=0
a=range:npt=0-2220.197000
a=length:npt=2220.197000
a=rtpmap:101 x-pn-realaudio
a=mimetype:string;"audio/x-pn-realaudio"
a=MinimumSwitchOverlap:integer;200
a=StartTime:integer;0
a=AvgBitRate:integer;64695
a=EndOneRuleEndAll:integer;1
a=AvgPacketSize:integer;744
a=SeekGreaterOnSwitch:integer;0
a=Preroll:integer;4640
a=MaxPacketSize:integer;744
a=MaxBitRate:integer;64695
a=RMFF 1.0 Flags:buffer;"AAwAAgAAAAIAAAACAAAAAgAAAAIAAAACAAA="
a=OpaqueData:buffer;"TUxUSQAMAAUABQACAAIAAQABAAAAAAADAAMABAAEAAYAAABWLnJh/QAFAAAucmE1AAAAAAAFAAAARgAKAAACNACJHDAAA7WMAAO1jAAOAjQAXgAAAABWIgAAViIAAAAQAAJnZW5yY29vawEHAAAAAAAIAQAAAgQAABIAAABWLnJh/QAFAAAucmE1AAAAAAAFAAAARgAJAAACRABUm2AAAklwAAJJcAAKAkQAOgAAAAArEQAAKxEAAAAQAAJnZW5yY29vawEHAAAAAAAIAQAAAgIAAAsAAABWLnJh/QAFAAAucmE1AAAAAAAFAAAARgACAAACNABEkoAAAdpoAAHaaAAIAjQALwAAAABWIgAAViIAAAAQAAFnZW5yY29vawEHAAAAAAAIAQAAAQIAABIAAABWLnJh/QAFAAAucmE1AAAAAAAFAAAARgALAAACgAC6uAAABQyAAAUMgAAQAoAAgAAAAABWIgAAViIAAAAQAAJnZW5yY29vawEHAAAAAAAIAQAAAgQAABgAAABWLnJh/QAFAAAucmE1AAAAAAAFAAAARgAMAAAC6AEPU2AAB1VwAAdVcAAUAugAugAAAACsRAAArEQAAAAQAAJnZW5yY29vawEHAAAAAAAIAQAAAggAACUAAABWLnJh/QAFAAAucmE1AAAAAAAFAAAARgAKAAACNACJHDAAA7WMAAO1jAAOAjQAXgAAAABWIgAAViIAAAAQAAJnZW5yY29vawEHAAAAAAAIAQAAAgQAABI="
a=StreamName:string;"audio/x-pn-multirate-realaudio logical stream"
a=ASMRuleBook:string;"#($OldPNMPlayer),AverageBandwidth=32460,priority=5,PNMKeyframeRule=T;#($OldPNMPlayer),AverageBandwidth=0,priority=5,PNMNonKeyframeRule=T;#($Bandwidth < 20000),AverageBandwidth=16230,Priority=5;#($Bandwidth < 20000),AverageBandwidth=0,Priority=5,OnDepend=\"2\", OffDepend=\"2\";#($Bandwidth >= 20000) && ($Bandwidth < 32460),AverageBandwidth=20000,Priority=5;#($Bandwidth >= 20000) && ($Bandwidth < 32460),AverageBandwidth=0,Priority=5,OnDepend=\"4\", OffDepend=\"4\";#($Bandwidth >= 32460) && ($Bandwidth < 44137),AverageBandwidth=32460,Priority=5;#($Bandwidth >= 32460) && ($Bandwidth < 44137),AverageBandwidth=0,Priority=5,OnDepend=\"6\", OffDepend=\"6\";#($Bandwidth >= 44137) && ($Bandwidth < 64695),AverageBandwidth=44137,Priority=5;#($Bandwidth >= 44137) && ($Bandwidth < 64695),AverageBandwidth=0,Priority=5,OnDepend=\"8\", OffDepend=\"8\";#($Bandwidth >= 64695),AverageBandwidth=64695,Priority=5;#($Bandwidth >= 64695),AverageBandwidth=0,Priority=5,OnDepend=\"
 10\", OffDepend=\"10\";"
SETUP rtsp://real-od.stream.ne.jp:554//vod/impress/video/KME/kurousagi/kurousagi0318.rm/streamid=0 RTSP/1.0
Cseq: 3
Session: 1362853220-1
RealChallenge2: a858ed3332f0f6467c1cc19ba17d136001d0a8e3, sd=ae3f7ca1
If-Match: 1362853220-1
Transport: x-pn-tng/tcp;mode=play,rtp/avp/tcp;unicast;mode=play

RTSP/1.0 404 Not Found
CSeq: 3
Date: Sat, 20 Mar 2004 19:55:55 JST
X-NetCache-Error: Above2-NC2 (NetCache NetApp/5.3.1R4D8) SETUP_BEFORE_DESCRIBE(408815.0)
Via: 1.0 Above2-NC2 (NetCache NetApp/5.3.1R4D8)

SET_PARAMETER rtsp://real-od.stream.ne.jp:554/vod/impress/video/KME/kurousagi/kurousagi0318.rm RTSP/1.0
Cseq: 4
Session: 1362853220-1
Subscribe: stream=0;rule=10,stream=0;rule=11



More information about the MPlayer-dev-eng mailing list