mirror of
https://gitee.com/xia-chu/ZLMediaKit.git
synced 2026-05-06 10:57:50 +08:00
音视频时间戳相差太大时强制同步
This commit is contained in:
parent
32ab752263
commit
88ef00e429
@ -148,10 +148,11 @@ void Stamp::revise_l(int64_t dts, int64_t pts, int64_t &dts_out, int64_t &pts_ou
|
||||
if (ABS(dts_diff) < 5000 || _need_sync > 3) {
|
||||
// 两种时间戳相差不得大于300ms
|
||||
dts_diff = _relative_stamp - _sync_master->_relative_stamp;
|
||||
// 强制同步音视频
|
||||
if (dts_diff > 300) {
|
||||
dts_diff = 300;
|
||||
dts_diff = 0;
|
||||
} else if (dts_diff < -300) {
|
||||
dts_diff = -300;
|
||||
dts_diff = 0;
|
||||
}
|
||||
// 如果绝对时间戳小于5秒,那么说明他们的起始时间戳是一致的,那么强制同步 [AUTO-TRANSLATED:5d11ef6a]
|
||||
// If the absolute timestamp is less than 5 seconds, then it means that their starting timestamps are consistent, then force synchronization
|
||||
|
||||
Loading…
Reference in New Issue
Block a user