Commit b842860
Fix #1156 Crackling sound when cutting pcm_s24le in mkv
For the provided test clip, Libav provides an audio timebase of
1000 ticks per second for the PTS. However, the sample rate is
48000 samples per second. That means each pts tick represents 48
audio samples. The PTS calculation is drived from muliple
calculations including the profile frame rate. Those calculations
create opportunities for rounding errors in the sample calculation.
In this case, after an initial synchornization, the PTS calculation
still would occasionally find an offset of 1 tick.
This change essentially changes the synchronization to not take
action unless the offset is greater than 1 tick. When it does take
action to synchronize, it uses all the precision that it has.1 parent 7707aac commit b842860
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3347 | 3347 | | |
3348 | 3348 | | |
3349 | 3349 | | |
3350 | | - | |
| 3350 | + | |
| 3351 | + | |
| 3352 | + | |
| 3353 | + | |
| 3354 | + | |
3351 | 3355 | | |
3352 | 3356 | | |
3353 | 3357 | | |
| |||
0 commit comments