From a17b5364ea41cddeaad74031846272d0efbb672e Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 30 Oct 2013 21:11:28 +0100 Subject: ao_alsa: return negative value on error in play() No functional change, because the only user of ao_play() ignores return values below 1. --- audio/out/ao_alsa.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'audio/out') diff --git a/audio/out/ao_alsa.c b/audio/out/ao_alsa.c index 1d0d19230f..1ad7598075 100644 --- a/audio/out/ao_alsa.c +++ b/audio/out/ao_alsa.c @@ -652,7 +652,7 @@ static int play(struct ao *ao, void *data, int len, int flags) if (!p->alsa) { MP_ERR(ao, "Device configuration error."); - return 0; + return -1; } if (num_frames == 0) @@ -678,10 +678,10 @@ static int play(struct ao *ao, void *data, int len, int flags) } } while (res == 0); - return res < 0 ? 0 : res * p->bytes_per_sample; + return res < 0 ? -1 : res * p->bytes_per_sample; alsa_error: - return 0; + return -1; } /* how many byes are free in the buffer */ -- cgit v1.2.3