diff options
author | wm4 <wm4@nowhere> | 2015-10-14 18:51:12 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-10-14 18:51:12 +0200 |
commit | e0f8d797720ed00a731d8fb8d41995501609c34b (patch) | |
tree | d17fc2a31a3ddcec7518caa12739c0b11c1c136e /player/video.c | |
parent | da496ae2fe5575b94eda64f03f23a03075d83477 (diff) | |
download | mpv-e0f8d797720ed00a731d8fb8d41995501609c34b.tar.bz2 mpv-e0f8d797720ed00a731d8fb8d41995501609c34b.tar.xz |
af_lavrresample: fix unintended audio drift when setting playback speed
Small adjustments to the playback speed use swr_set_compensation()
to stretch the audio as it is required. But since large adjustments
are now handled by actually reinitializing libswresample, the small
adjustments get rounded off completely with typical frame sizes.
Compensate for this by accounting for the rounding error and keeping
track of fractional samples that should have been output to achieve
the correct ratio.
This fixes display sync mode behavior, which requires these adjustments
to be relatively accurate.
Diffstat (limited to 'player/video.c')
0 files changed, 0 insertions, 0 deletions