diff options
author | wm4 <wm4@nowhere> | 2015-01-29 12:10:07 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-01-29 15:15:01 +0100 |
commit | 86d4094b98dcfb3e57578c38d842fa7a13aa2605 (patch) | |
tree | 58efe55ea2500d4d22747ef7ca28e51a5fb8471f /player/audio.c | |
parent | 34d3a27f28030a05830a775420cc692a2156bf7d (diff) | |
download | mpv-86d4094b98dcfb3e57578c38d842fa7a13aa2605.tar.bz2 mpv-86d4094b98dcfb3e57578c38d842fa7a13aa2605.tar.xz |
player: remove redundant variable
mpctx->audio_delay always has the same value as opts->audio_delay. (This
was not the case a long time ago, when the audio-delay property didn't
actually write to opts->audio_delay. I think.)
Diffstat (limited to 'player/audio.c')
-rw-r--r-- | player/audio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/player/audio.c b/player/audio.c index d6fb348f58..9193d9d6f2 100644 --- a/player/audio.c +++ b/player/audio.c @@ -420,7 +420,7 @@ static bool get_sync_samples(struct MPContext *mpctx, int *skip) } if (sync_to_video) - sync_pts -= mpctx->audio_delay - mpctx->delay; + sync_pts -= opts->audio_delay - mpctx->delay; double ptsdiff = written_pts - sync_pts; // Missing timestamp, or PTS reset, or just broken. @@ -560,7 +560,7 @@ static void do_fill_audio_out_buffers(struct MPContext *mpctx, double endpts) int playflags = 0; if (endpts != MP_NOPTS_VALUE) { - double samples = (endpts - written_audio_pts(mpctx) - mpctx->audio_delay) + double samples = (endpts - written_audio_pts(mpctx) - opts->audio_delay) * play_samplerate; if (playsize > samples) { playsize = MPMAX(samples, 0); |