Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
srs
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
winlin
2014-06-14 20:44:38 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f893711499b9e283616c83183f84c1fcd25b14b4
f8937114
1 parent
3f9c23d8
fix #98: workaround for librtmp ping(fmt=1,cid=2 fresh stream).
隐藏空白字符变更
内嵌
并排对比
正在显示
3 个修改的文件
包含
19 行增加
和
5 行删除
README.md
trunk/src/core/srs_core.hpp
trunk/src/rtmp/srs_protocol_rtmp_stack.cpp
README.md
查看文件 @
f893711
...
...
@@ -231,6 +231,7 @@ Supported operating systems and hardware:
*
2013-10-17, Created.
<br/>
## History
*
v1.0, 2014-06-14, fix
[
#98
](
https://github.com/winlinvip/simple-rtmp-server/issues/98
)
, workaround for librtmp ping(fmt=1,cid=2 fresh stream). 0.9.124
*
v1.0, 2014-05-29, support flv inject and flv http streaming with start=bytes. 0.9.122
*
<strong>
v1.0, 2014-05-28,
[
1.0 mainline4(0.9.120)
](
https://github.com/winlinvip/simple-rtmp-server/releases/tag/1.0.mainline4
)
released. 39200 lines.
</strong>
*
v1.0, 2014-05-27, fix
[
#87
](
https://github.com/winlinvip/simple-rtmp-server/issues/87
)
, add source id for full trackable log. 0.9.120
...
...
trunk/src/core/srs_core.hpp
查看文件 @
f893711
...
...
@@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// current release version
#define VERSION_MAJOR "0"
#define VERSION_MINOR "9"
#define VERSION_REVISION "12
3
"
#define VERSION_REVISION "12
4
"
#define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION
// server info.
#define RTMP_SIG_SRS_KEY "SRS"
...
...
trunk/src/rtmp/srs_protocol_rtmp_stack.cpp
查看文件 @
f893711
...
...
@@ -954,10 +954,23 @@ int SrsProtocol::read_message_header(SrsChunkStream* chunk, char fmt, int bh_siz
// but, we can ensure that when a chunk stream is fresh,
// the fmt must be 0, a new stream.
if
(
chunk
->
msg_count
==
0
&&
fmt
!=
RTMP_FMT_TYPE0
)
{
ret
=
ERROR_RTMP_CHUNK_START
;
srs_error
(
"chunk stream is fresh, fmt must be %d, actual is %d. cid=%d, ret=%d"
,
RTMP_FMT_TYPE0
,
fmt
,
chunk
->
cid
,
ret
);
return
ret
;
// for librtmp, if ping, it will send a fresh stream with fmt=1,
// 0x42 where: fmt=1, cid=2, protocol contorl user-control message
// 0x00 0x00 0x00 where: timestamp=0
// 0x00 0x00 0x06 where: payload_length=6
// 0x04 where: message_type=4(protocol control user-control message)
// 0x00 0x06 where: event Ping(0x06)
// 0x00 0x00 0x0d 0x0f where: event data 4bytes ping timestamp.
// @see: https://github.com/winlinvip/simple-rtmp-server/issues/98
if
(
chunk
->
cid
==
RTMP_CID_ProtocolControl
&&
fmt
==
RTMP_FMT_TYPE1
)
{
srs_warn
(
"accept cid=2, fmt=1 to make librtmp happy."
);
}
else
{
// must be a RTMP protocol level error.
ret
=
ERROR_RTMP_CHUNK_START
;
srs_error
(
"chunk stream is fresh, fmt must be %d, actual is %d. cid=%d, ret=%d"
,
RTMP_FMT_TYPE0
,
fmt
,
chunk
->
cid
,
ret
);
return
ret
;
}
}
// when exists cache msg, means got an partial message,
...
...
请
注册
或
登录
后发表评论