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-04-21 12:58:54 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c514a4ceeb700db68c101274e059a5c49cc8883f
c514a4ce
1 parent
a28eec89
use atc for ingest hls aac time.
显示空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
6 行增加
和
4 行删除
trunk/src/main/srs_main_ingest_hls.cpp
trunk/src/main/srs_main_ingest_hls.cpp
查看文件 @
c514a4c
...
...
@@ -657,7 +657,7 @@ public:
SrsIngestSrsOutput
(
SrsHttpUri
*
rtmp
)
{
out_rtmp
=
rtmp
;
disconnected
=
false
;
raw_aac_dts
=
0
;
raw_aac_dts
=
srs_update_system_time_ms
()
;
req
=
NULL
;
io
=
NULL
;
...
...
@@ -807,12 +807,14 @@ int SrsIngestSrsOutput::do_on_aac_frame(SrsStream* avs, double duration)
{
int
ret
=
ERROR_SUCCESS
;
u_int32_t
duration_ms
=
(
u_int32_t
)(
duration
*
1000
);
// ts tbn to flv tbn.
u_int32_t
dts
=
(
u_int32_t
)
raw_aac_dts
;
raw_aac_dts
+=
(
int64_t
)(
duration
*
1000
)
;
raw_aac_dts
+=
duration_ms
;
// got the next msg to calc the delta duration for each audio.
u_int32_t
max_dts
=
dts
+
(
u_int32_t
)(
duration
*
1000
)
;
u_int32_t
max_dts
=
dts
+
duration_ms
;
// send each frame.
while
(
!
avs
->
empty
())
{
...
...
@@ -852,7 +854,7 @@ int SrsIngestSrsOutput::do_on_aac_frame(SrsStream* avs, double duration)
}
// calc the delta of dts, when previous frame output.
u_int32_t
delta
=
(
duration
*
1000
)
/
(
avs
->
size
()
/
frame_size
);
u_int32_t
delta
=
duration_ms
/
(
avs
->
size
()
/
frame_size
);
dts
=
(
u_int32_t
)(
srs_min
(
max_dts
,
dts
+
delta
));
}
...
...
请
注册
或
登录
后发表评论