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-01-25 13:30:45 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
9cbc753e8e4c6a8d6703f58f62072364f8d83ad5
9cbc753e
1 parent
b0daf148
for #151, #268, refine the pcr start at 0, dts/pts plus delay. 1.0.25
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
9 行增加
和
7 行删除
trunk/src/app/srs_app_hls.cpp
trunk/src/core/srs_core.hpp
trunk/src/app/srs_app_hls.cpp
查看文件 @
9cbc753
...
...
@@ -240,7 +240,7 @@ public:
*
p
++
=
7
;
// size
*
p
++
=
0x50
;
// random access + PCR
// about the pcr, read https://github.com/winlinvip/simple-rtmp-server/issues/151#issuecomment-71352511
p
=
write_pcr
(
p
,
frame
->
dts
-
SRS_AUTO_HLS_DELAY
);
p
=
write_pcr
(
p
,
frame
->
dts
);
}
// PES header
...
...
@@ -296,11 +296,11 @@ public:
*
p
++
=
header_size
;
// pts; // 33bits
p
=
write_pts
(
p
,
flags
>>
6
,
frame
->
pts
);
p
=
write_pts
(
p
,
flags
>>
6
,
frame
->
pts
+
SRS_AUTO_HLS_DELAY
);
// dts; // 33bits
if
(
frame
->
dts
!=
frame
->
pts
)
{
p
=
write_pts
(
p
,
1
,
frame
->
dts
);
p
=
write_pts
(
p
,
1
,
frame
->
dts
+
SRS_AUTO_HLS_DELAY
);
}
}
...
...
@@ -371,10 +371,12 @@ private:
}
static
char
*
write_pcr
(
char
*
p
,
int64_t
pcr
)
{
// the pcr=dts-delay
// and the pcr maybe negative
// the pcr=dts-delay, where dts = frame->dts + delay
// and the pcr should never be negative
// @see https://github.com/winlinvip/simple-rtmp-server/issues/268
int64_t
v
=
srs_max
(
0
,
pcr
);
srs_assert
(
pcr
>=
0
);
int64_t
v
=
pcr
;
*
p
++
=
(
char
)
(
v
>>
25
);
*
p
++
=
(
char
)
(
v
>>
17
);
...
...
trunk/src/core/srs_core.hpp
查看文件 @
9cbc753
...
...
@@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// current release version
#define VERSION_MAJOR 1
#define VERSION_MINOR 0
#define VERSION_REVISION 2
4
#define VERSION_REVISION 2
5
// server info.
#define RTMP_SIG_SRS_KEY "SRS"
...
...
请
注册
或
登录
后发表评论