0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00

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:
wm4 2015-01-30 21:10:39 +01:00
parent 5f7de39942
commit 9d57e7d23c

View File

@ -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;
} }