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
2015-09-12 16:36:29 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0d6c24581d702e905c7fbf0188fc00028ab901f4
0d6c2458
1 parent
7ae76b57
refine json number, use int64 when number is int.
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
9 行增加
和
1 行删除
trunk/src/protocol/srs_rtmp_amf0.cpp
trunk/src/protocol/srs_rtmp_amf0.cpp
查看文件 @
0d6c245
...
...
@@ -341,9 +341,17 @@ string SrsAmf0Any::to_json()
return
to_boolean
()
?
"true"
:
"false"
;
}
case
RTMP_AMF0_Number
:
{
double
v
=
to_number
();
int64_t
iv
=
(
int64_t
)
v
;
// len(max int64_t) is 20, plus one "+-."
char
tmp
[
22
];
snprintf
(
tmp
,
22
,
"%f"
,
to_number
());
if
(
v
==
iv
)
{
snprintf
(
tmp
,
22
,
"%"
PRId64
,
iv
);
}
else
{
snprintf
(
tmp
,
22
,
"%.6f"
,
to_number
());
}
return
tmp
;
}
case
RTMP_AMF0_Null
:
{
...
...
请
注册
或
登录
后发表评论