diff options
author | wm4 <wm4@nowhere> | 2014-10-10 13:18:53 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-10-10 13:18:53 +0200 |
commit | bd41fc7723a6e163de88c678826ff87779ee1af6 (patch) | |
tree | c80e4600d473001e62e8288928b8911875eb199b /audio/out/internal.h | |
parent | a8ec044d54817186193191f07b6d763cb823f1a1 (diff) | |
download | mpv-bd41fc7723a6e163de88c678826ff87779ee1af6.tar.bz2 mpv-bd41fc7723a6e163de88c678826ff87779ee1af6.tar.xz |
audio/out/push: fix EOF heuristic
Since the internal AO driver API has no proper way to determine EOF, we
need to guess by querying get_delay. But some AOs (e.g. ao_pulse with
no-latency-hacks set) may never reach 0, maybe because they naively add
the latency to the buffer level. In this case our heuristic can break.
Fix by always using the delay to estimate the EOF time. It's not even
that important - it's mostly used to avoid blocking draining. So this
should be ok.
CC: @mpv-player/stable (maybe)
Diffstat (limited to 'audio/out/internal.h')
-rw-r--r-- | audio/out/internal.h | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/audio/out/internal.h b/audio/out/internal.h index 7c5647d8fe..4532ff2c0c 100644 --- a/audio/out/internal.h +++ b/audio/out/internal.h @@ -24,11 +24,6 @@ #include "audio/out/ao.h" -// If ao_get_delay() reaches this value after ao_play() was called with the -// AOPLAY_FINAL_CHUNK flag set, the playback core expects that the audio has -// all been played. -#define AO_EOF_DELAY 0.05 - /* global data used by ao.c and ao drivers */ struct ao { int samplerate; |