From e47e51ee5bf473d001ba990e0b281a8b7c26d013 Mon Sep 17 00:00:00 2001 From: Thulinma Date: Sat, 4 Sep 2010 14:47:03 +0200 Subject: [PATCH] Fixed RTMP hanging bug, added to RTSP SDP --- Connector_RTMP/parsechunks.cpp | 1 + Connector_RTSP/rtsp.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Connector_RTMP/parsechunks.cpp b/Connector_RTMP/parsechunks.cpp index f70ad2ea..95b5ece8 100644 --- a/Connector_RTMP/parsechunks.cpp +++ b/Connector_RTMP/parsechunks.cpp @@ -148,6 +148,7 @@ void parseChunk(){ amfreply.addContent(AMFType("", (double)0, 0x05));//null - command info amfreply.addContent(AMFType("", (double)1));//stream ID - we use 1 SendChunk(3, 20, next.msg_stream_id, amfreply.Pack()); + SendUSR(0, 0);//send UCM StreamBegin (0), stream 0 #ifdef DEBUG fprintf(stderr, "AMF0 command: createStream result\n"); #endif diff --git a/Connector_RTSP/rtsp.cpp b/Connector_RTSP/rtsp.cpp index bc3d04fd..a8b07812 100644 --- a/Connector_RTSP/rtsp.cpp +++ b/Connector_RTSP/rtsp.cpp @@ -102,7 +102,7 @@ void ParseRTSPPacket(){ //parse DESCRIBE request if (q.params["request"] == "DESCRIBE"){ a.params["Content-Type"] = "application/sdp"; - a.data = "v=0\r\no=- 0 0 IN IP4 ddvtech.com\r\ns=PLSServer\r\nc=IN IP4 0.0.0.0\r\na=recvonly\r\nt=0 0\r\nm=video 0 RTP/AVP 98\r\na=rtpmap:98 H264/90000\r\nm=audio 0 RTP/AVP 99\r\na=rtpmap:99 MPEG4-GENERIC/11025/1\r\n"; + a.data = "v=0\r\no=- 0 0 IN IP4 ddvtech.com\r\ns=PLSServer\r\nc=IN IP4 0.0.0.0\r\na=recvonly\r\nt=0 0\r\nm=video 0 RTP/AVP 98\r\na=rtpmap:98 H264/90000\r\na=fmtp:98 packetization-mode=1\r\nm=audio 0 RTP/AVP 99\r\na=rtpmap:99 MPEG4-GENERIC/11025/1\r\na=ftmp:99 profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexltalength=3; config=1210\r\n"; RTSPReply(q, a, "200 OK"); DEBUG("Sent DESCRIBE reply\n"); }