mirror of https://github.com/mpv-player/mpv
player: use correct type for some relative times
We use double for these things everywhere, just this code didn't. It likely doesn't matter much, and this code is for an optional feature too.
This commit is contained in:
parent
5f7de39942
commit
9d57e7d23c
|
@ -681,9 +681,9 @@ static void update_avsync_before_frame(struct MPContext *mpctx)
|
||||||
* This is badly implemented; the behavior of the smoothing
|
* This is badly implemented; the behavior of the smoothing
|
||||||
* now undesirably depends on how often this code runs
|
* now undesirably depends on how often this code runs
|
||||||
* (mainly depends on video frame rate). */
|
* (mainly depends on video frame rate). */
|
||||||
float predicted = mpctx->delay / opts->playback_speed +
|
double predicted = mpctx->delay / opts->playback_speed +
|
||||||
mpctx->time_frame;
|
mpctx->time_frame;
|
||||||
float difference = buffered_audio - predicted;
|
double difference = buffered_audio - predicted;
|
||||||
buffered_audio = predicted + difference / opts->autosync;
|
buffered_audio = predicted + difference / opts->autosync;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue