Unverified 提交 9101f456 authored 作者: Iñaki Baz Castillo's avatar Iñaki Baz Castillo 提交者: GitHub

Fix jitter calculation (#1019)

上级 0b93b9d4
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
### NEXT ### NEXT
* Fix jitter calculation ([PR #1019](https://github.com/versatica/mediasoup/pull/1019), credits to @alexciarlillo and @snnz).
* Update NPM deps. * Update NPM deps.
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
"devDependencies": { "devDependencies": {
"@types/debug": "^4.1.7", "@types/debug": "^4.1.7",
"@types/jest": "^29.4.0", "@types/jest": "^29.4.0",
"@types/node": "^18.14.4", "@types/node": "^18.14.5",
"@types/uuid": "^9.0.1", "@types/uuid": "^9.0.1",
"@typescript-eslint/eslint-plugin": "^5.54.0", "@typescript-eslint/eslint-plugin": "^5.54.0",
"@typescript-eslint/parser": "^5.54.0", "@typescript-eslint/parser": "^5.54.0",
...@@ -1317,9 +1317,9 @@ ...@@ -1317,9 +1317,9 @@
"dev": true "dev": true
}, },
"node_modules/@types/node": { "node_modules/@types/node": {
"version": "18.14.4", "version": "18.14.5",
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.14.4.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.14.5.tgz",
"integrity": "sha512-VhCw7I7qO2X49+jaKcAUwi3rR+hbxT5VcYF493+Z5kMLI0DL568b7JI4IDJaxWFH0D/xwmGJNoXisyX+w7GH/g==", "integrity": "sha512-CRT4tMK/DHYhw1fcCEBwME9CSaZNclxfzVMe7GsO6ULSwsttbj70wSiX6rZdIjGblu93sTJxLdhNIT85KKI7Qw==",
"dev": true "dev": true
}, },
"node_modules/@types/normalize-package-data": { "node_modules/@types/normalize-package-data": {
...@@ -6754,9 +6754,9 @@ ...@@ -6754,9 +6754,9 @@
"dev": true "dev": true
}, },
"@types/node": { "@types/node": {
"version": "18.14.4", "version": "18.14.5",
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.14.4.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.14.5.tgz",
"integrity": "sha512-VhCw7I7qO2X49+jaKcAUwi3rR+hbxT5VcYF493+Z5kMLI0DL568b7JI4IDJaxWFH0D/xwmGJNoXisyX+w7GH/g==", "integrity": "sha512-CRT4tMK/DHYhw1fcCEBwME9CSaZNclxfzVMe7GsO6ULSwsttbj70wSiX6rZdIjGblu93sTJxLdhNIT85KKI7Qw==",
"dev": true "dev": true
}, },
"@types/normalize-package-data": { "@types/normalize-package-data": {
......
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
"devDependencies": { "devDependencies": {
"@types/debug": "^4.1.7", "@types/debug": "^4.1.7",
"@types/jest": "^29.4.0", "@types/jest": "^29.4.0",
"@types/node": "^18.14.4", "@types/node": "^18.14.5",
"@types/uuid": "^9.0.1", "@types/uuid": "^9.0.1",
"@typescript-eslint/eslint-plugin": "^5.54.0", "@typescript-eslint/eslint-plugin": "^5.54.0",
"@typescript-eslint/parser": "^5.54.0", "@typescript-eslint/parser": "^5.54.0",
......
...@@ -645,8 +645,9 @@ namespace RTC ...@@ -645,8 +645,9 @@ namespace RTC
if (this->params.clockRate == 0u) if (this->params.clockRate == 0u)
return; return;
auto transit = // NOTE: Based on https://github.com/versatica/mediasoup/issues/1018.
static_cast<int>(DepLibUV::GetTimeMs() - (rtpTimestamp * 1000 / this->params.clockRate)); auto transit = static_cast<int>(
DepLibUV::GetTimeMs() - (static_cast<uint64_t>(rtpTimestamp) * 1000 / this->params.clockRate));
int d = transit - this->transit; int d = transit - this->transit;
// First transit calculation, save and return. // First transit calculation, save and return.
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论