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
2013-10-19 18:46:12 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
810bb6ba385f36f52eed9926d29a2b6c84a68b41
810bb6ba
1 parent
a638ebd1
decode amf0 string
隐藏空白字符变更
内嵌
并排对比
正在显示
4 个修改的文件
包含
24 行增加
和
0 行删除
trunk/src/core/srs_core_amf0.cpp
trunk/src/core/srs_core_amf0.hpp
trunk/src/core/srs_core_protocol.cpp
trunk/src/core/srs_core_protocol.hpp
trunk/src/core/srs_core_amf0.cpp
查看文件 @
810bb6b
...
...
@@ -95,3 +95,9 @@ std::string srs_amf0_read_string(SrsStream* stream)
return
str
;
}
double
srs_amf0_read_number
(
SrsStream
*
stream
)
{
return
0
;
}
...
...
trunk/src/core/srs_core_amf0.hpp
查看文件 @
810bb6b
...
...
@@ -36,7 +36,16 @@ class SrsStream;
/**
* read amf0 string from stream.
* 2.4 String Type
* string-type = string-marker UTF-8
*/
extern
std
::
string
srs_amf0_read_string
(
SrsStream
*
stream
);
/**
* read amf0 number from stream.
* 2.2 Number Type
* number-type = number-marker DOUBLE
*/
extern
double
srs_amf0_read_number
(
SrsStream
*
stream
);
#endif
\ No newline at end of file
...
...
trunk/src/core/srs_core_protocol.cpp
查看文件 @
810bb6b
...
...
@@ -341,6 +341,14 @@ int SrsConnectAppPacket::decode(SrsStream* stream)
return
ret
;
}
transaction_id
=
srs_amf0_read_number
(
stream
);
if
(
transaction_id
!=
1.0
)
{
ret
=
ERROR_RTMP_AMF0_DECODE
;
srs_error
(
"amf0 decode connect transaction_id failed. "
"required=%.1f, actual=%.1f, ret=%d"
,
1.0
,
transaction_id
,
ret
);
return
ret
;
}
return
ret
;
}
...
...
trunk/src/core/srs_core_protocol.hpp
查看文件 @
810bb6b
...
...
@@ -163,6 +163,7 @@ private:
typedef
SrsPacket
super
;
private
:
std
::
string
command_name
;
double
transaction_id
;
public
:
SrsConnectAppPacket
();
virtual
~
SrsConnectAppPacket
();
...
...
请
注册
或
登录
后发表评论