diff options
author | wm4 <wm4@nowhere> | 2015-10-28 23:56:31 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-10-28 23:57:24 +0100 |
commit | ce82d8821528b68fca10cfdd5271884e5afee8e4 (patch) | |
tree | daa8464956abc9c7873bac448b17a1e75bd5bb07 /player | |
parent | d1ad0815fe2406504ac5cc5a498ae5d8143c1d98 (diff) | |
download | mpv-ce82d8821528b68fca10cfdd5271884e5afee8e4.tar.bz2 mpv-ce82d8821528b68fca10cfdd5271884e5afee8e4.tar.xz |
player: reset AO stats on pause and other discontinuities
It's annoying.
Diffstat (limited to 'player')
-rw-r--r-- | player/audio.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/player/audio.c b/player/audio.c index 5e19f118d0..0204cd8287 100644 --- a/player/audio.c +++ b/player/audio.c @@ -415,8 +415,10 @@ static void dump_audio_stats(struct MPContext *mpctx) { if (!mp_msg_test(mpctx->log, MSGL_STATS)) return; - if (mpctx->audio_status != STATUS_PLAYING || !mpctx->ao) + if (mpctx->audio_status != STATUS_PLAYING || !mpctx->ao || mpctx->paused) { + mpctx->audio_stat_start = 0; return; + } double delay = ao_get_delay(mpctx->ao); if (!mpctx->audio_stat_start) { |