summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-12-21 17:36:56 +0100
committerwm4 <wm4@nowhere>2013-12-21 17:36:56 +0100
commitfdceef6cc5f11ecd86f5cb6d213e82fe9fa8b66b (patch)
tree756d23b650487187a39ee08259087f869f1931f4
parentad05e76c57820eb93a21f8e4185f36f58ec2c1fc (diff)
downloadmpv-fdceef6cc5f11ecd86f5cb6d213e82fe9fa8b66b.tar.bz2
mpv-fdceef6cc5f11ecd86f5cb6d213e82fe9fa8b66b.tar.xz
ao_alsa: don't set ALSA message callback
This could output additional, potentially useful error messages. But the callback is global and not library-safe, and would require us to add additional state. Remove it, because it's obviously too much of a pain. Also, it seems ALSA prints stuff to stderr anyway.
-rw-r--r--audio/out/ao_alsa.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/audio/out/ao_alsa.c b/audio/out/ao_alsa.c
index a65b9b05ec..f4884f077c 100644
--- a/audio/out/ao_alsa.c
+++ b/audio/out/ao_alsa.c
@@ -80,25 +80,6 @@ struct priv {
static float get_delay(struct ao *ao);
static void uninit(struct ao *ao, bool immed);
-static void alsa_error_handler(const char *file, int line, const char *function,
- int err, const char *format, ...)
-{
- char tmp[0xc00];
- va_list va;
-
- va_start(va, format);
- vsnprintf(tmp, sizeof tmp, format, va);
- va_end(va);
-
- if (err) {
- mp_msg(MSGT_AO, MSGL_ERR, "alsa-lib: %s:%i:(%s) %s: %s\n",
- file, line, function, tmp, snd_strerror(err));
- } else {
- mp_msg(MSGT_AO, MSGL_ERR, "alsa-lib: %s:%i:(%s) %s\n",
- file, line, function, tmp);
- }
-}
-
/* to set/get/query special features/parameters */
static int control(struct ao *ao, enum aocontrol cmd, void *arg)
{
@@ -401,7 +382,6 @@ static int init(struct ao *ao)
p->can_pause = 1;
MP_VERBOSE(ao, "using ALSA version: %s\n", snd_asoundlib_version());
- snd_lib_error_set_handler(alsa_error_handler);
int open_mode = p->cfg_block ? 0 : SND_PCM_NONBLOCK;
//modes = 0, SND_PCM_NONBLOCK, SND_PCM_ASYNC
@@ -573,7 +553,6 @@ static void uninit(struct ao *ao, bool immed)
alsa_error:
p->alsa = NULL;
- snd_lib_error_set_handler(NULL);
}
static void audio_pause(struct ao *ao)