diff options
author | wm4 <wm4@nowhere> | 2013-12-21 17:36:56 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-12-21 17:36:56 +0100 |
commit | fdceef6cc5f11ecd86f5cb6d213e82fe9fa8b66b (patch) | |
tree | 756d23b650487187a39ee08259087f869f1931f4 /audio/out/ao_alsa.c | |
parent | ad05e76c57820eb93a21f8e4185f36f58ec2c1fc (diff) | |
download | mpv-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.
Diffstat (limited to 'audio/out/ao_alsa.c')
-rw-r--r-- | audio/out/ao_alsa.c | 21 |
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) |