mirror of
https://github.com/mpv-player/mpv.git
synced 2026-10-28 23:13:18 +08:00
ao_alsa: log more information on short writes
This commit is contained in:
+4
-2
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user