diff options
author | wm4 <wm4@nowhere> | 2015-05-08 14:24:20 +0200 |
---|---|---|
committer | Diogo Franco (Kovensky) <diogomfranco@gmail.com> | 2015-05-09 20:18:35 +0900 |
commit | d224c8903418d173df9459a9c2b0c4e542db661d (patch) | |
tree | 3466d95452cc0841f7b4d79699bc0666d14b89e7 | |
parent | 63b92944d070dbf7e03532084dee377e1a78b992 (diff) | |
download | mpv-d224c8903418d173df9459a9c2b0c4e542db661d.tar.bz2 mpv-d224c8903418d173df9459a9c2b0c4e542db661d.tar.xz |
ao_alsa: log requested numbers of channels if ALSA rejects them
(cherry picked from commit ad9bce2a5ca62f6a64f65fe79ae170edc0e05da4)
-rw-r--r-- | audio/out/ao_alsa.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/audio/out/ao_alsa.c b/audio/out/ao_alsa.c index e31e8012f8..36f0381bf6 100644 --- a/audio/out/ao_alsa.c +++ b/audio/out/ao_alsa.c @@ -506,11 +506,12 @@ static int init_device(struct ao *ao, bool second_try) } if (num_channels != ao->channels.num) { + int req = ao->channels.num; mp_chmap_from_channels_alsa(&ao->channels, num_channels); if (!mp_chmap_is_valid(&ao->channels)) mp_chmap_from_channels(&ao->channels, 2); - MP_ERR(ao, "Couldn't get requested number of channels, fallback to %s.\n", - mp_chmap_to_str(&ao->channels)); + MP_ERR(ao, "Couldn't get requested number of channels (%d), fallback " + "to %s.\n", req, mp_chmap_to_str(&ao->channels)); } // Some ALSA drivers have broken delay reporting, so disable the ALSA |