From 5fc34cb4d67432cb46aeefba0025cc364df02e98 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 2 Sep 2020 22:22:45 +0200 Subject: ao_alsa: log more information on short writes --- audio/out/ao_alsa.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'audio') diff --git a/audio/out/ao_alsa.c b/audio/out/ao_alsa.c index 49bdd32835..552982ffb2 100644 --- a/audio/out/ao_alsa.c +++ b/audio/out/ao_alsa.c @@ -1085,8 +1085,10 @@ static bool audio_write(struct ao *ao, void **data, int samples) } CHECK_ALSA_ERROR("pcm write error"); - if (err != samples) - MP_WARN(ao, "unexpected short write\n"); + if (err >= 0 && err != samples) { + MP_WARN(ao, "unexpected short write (%d of %d frames), dropping audio\n", + (int)err, samples); + } return true; -- cgit v1.2.3