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-26 10:13:43 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0cd07615084e1e21d95760b6cb28dd80faf9b298
0cd07615
1 parent
1970e18e
fix time jitter zero algorithm bug, reset when timestamp overflow.
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
20 行增加
和
13 行删除
trunk/src/app/srs_app_source.cpp
trunk/src/core/srs_core.hpp
trunk/src/app/srs_app_source.cpp
查看文件 @
0cd0761
...
...
@@ -69,25 +69,32 @@ int SrsRtmpJitter::correct(SrsSharedPtrMessage* msg, int tba, int tbv, SrsRtmpJi
{
int
ret
=
ERROR_SUCCESS
;
// all jitter correct features is disabled, ignore.
if
(
ag
==
SrsRtmpJitterAlgorithmOFF
)
{
return
ret
;
}
// start at zero, but donot ensure monotonically increasing.
if
(
ag
==
SrsRtmpJitterAlgorithmZERO
)
{
if
(
last_pkt_correct_time
<=
0
)
{
last_pkt_correct_time
=
msg
->
header
.
timestamp
;
// for performance issue
if
(
ag
!=
SrsRtmpJitterAlgorithmFULL
)
{
// all jitter correct features is disabled, ignore.
if
(
ag
==
SrsRtmpJitterAlgorithmOFF
)
{
return
ret
;
}
msg
->
header
.
timestamp
-=
last_pkt_correct_time
;
// start at zero, but donot ensure monotonically increasing.
if
(
ag
==
SrsRtmpJitterAlgorithmZERO
)
{
// for the first time, last_pkt_correct_time is zero.
// while when timestamp overflow, the timestamp become smaller, reset the last_pkt_correct_time.
if
(
last_pkt_correct_time
<=
0
||
last_pkt_correct_time
>
msg
->
header
.
timestamp
)
{
last_pkt_correct_time
=
msg
->
header
.
timestamp
;
}
msg
->
header
.
timestamp
-=
last_pkt_correct_time
;
return
ret
;
}
// other algorithm, ignore.
return
ret
;
}
// full jitter algorithm, do jitter correct.
// set to 0 for metadata.
if
(
!
msg
->
header
.
is_
video
()
&&
!
msg
->
header
.
is_audi
o
())
{
if
(
!
msg
->
header
.
is_
audio
()
&&
!
msg
->
header
.
is_vide
o
())
{
msg
->
header
.
timestamp
=
0
;
return
ret
;
}
...
...
trunk/src/core/srs_core.hpp
查看文件 @
0cd0761
...
...
@@ -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 "13
3
"
#define VERSION_REVISION "13
4
"
#define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION
// server info.
#define RTMP_SIG_SRS_KEY "SRS"
...
...
请
注册
或
登录
后发表评论