summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-10-28 23:56:31 +0100
committerwm4 <wm4@nowhere>2015-10-28 23:57:24 +0100
commitce82d8821528b68fca10cfdd5271884e5afee8e4 (patch)
treedaa8464956abc9c7873bac448b17a1e75bd5bb07
parentd1ad0815fe2406504ac5cc5a498ae5d8143c1d98 (diff)
downloadmpv-ce82d8821528b68fca10cfdd5271884e5afee8e4.tar.bz2
mpv-ce82d8821528b68fca10cfdd5271884e5afee8e4.tar.xz
player: reset AO stats on pause and other discontinuities
It's annoying.
-rw-r--r--player/audio.c4
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) {