diff options
author | wm4 <wm4@nowhere> | 2013-10-30 21:11:28 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-10-30 22:19:15 +0100 |
commit | a17b5364ea41cddeaad74031846272d0efbb672e (patch) | |
tree | 497d880e7cc2aa3b5c56c118899e1c11bf2b9516 | |
parent | 7ac88cb05bba794955cbd380253c90d9e5d0af89 (diff) | |
download | mpv-a17b5364ea41cddeaad74031846272d0efbb672e.tar.bz2 mpv-a17b5364ea41cddeaad74031846272d0efbb672e.tar.xz |
ao_alsa: return negative value on error in play()
No functional change, because the only user of ao_play() ignores return
values below 1.
-rw-r--r-- | audio/out/ao_alsa.c | 6 |
1 files changed, 3 insertions, 3 deletions
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 */ |