Changeset 5fe40a7544a0c45cfd1c5bd77c946efbd1d0dc94
- Timestamp:
- 11/11/05 09:32:30
(3 years ago)
- Author:
- Marian Durkovic <md@videolan.org>
- git-committer:
- Marian Durkovic <md@videolan.org> 1131697950 +0000
- git-parent:
[89b3eb7e3e1b2378dcfd0a1a497782420228a848]
- git-author:
- Marian Durkovic <md@videolan.org> 1131697950 +0000
- Message:
update cl->delta_cr only once per 200 msec to ensure better refclock
stability and mitigate temporary OS/network jitter problems
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r538d249 |
r5fe40a7 |
|
| 134 | 134 | cl->last_cr = 0; |
|---|
| 135 | 135 | cl->last_pts = 0; |
|---|
| | 136 | cl->last_sysdate = 0; |
|---|
| 136 | 137 | cl->cr_ref = 0; |
|---|
| 137 | 138 | cl->sysdate_ref = 0; |
|---|
| … | … | |
| 265 | 266 | { |
|---|
| 266 | 267 | cl->last_cr = 0; |
|---|
| | 268 | cl->last_sysdate = 0; |
|---|
| 267 | 269 | cl->delta_cr = 0; |
|---|
| 268 | 270 | cl->i_delta_cr_residue = 0; |
|---|
| … | … | |
| 309 | 311 | #endif |
|---|
| 310 | 312 | } |
|---|
| 311 | | else |
|---|
| | 313 | else if ( mdate() - cl->last_sysdate > 200000 ) |
|---|
| 312 | 314 | { |
|---|
| 313 | 315 | /* Smooth clock reference variations. */ |
|---|
| … | … | |
| 325 | 327 | % cl->i_cr_average; |
|---|
| 326 | 328 | cl->delta_cr = delta_cr; |
|---|
| | 329 | cl->last_sysdate = mdate(); |
|---|
| 327 | 330 | } |
|---|
| 328 | 331 | } |
|---|
| r538d249 |
r5fe40a7 |
|
| 134 | 134 | mtime_t delta_cr; |
|---|
| 135 | 135 | mtime_t cr_ref, sysdate_ref; |
|---|
| | 136 | mtime_t last_sysdate; |
|---|
| 136 | 137 | mtime_t last_cr; /* reference to detect unexpected stream |
|---|
| 137 | 138 | * discontinuities */ |
|---|