[vlc-commits] ALSA: favor channel maps with fewer unused channels
Rémi Denis-Courmont
git at videolan.org
Thu Jul 25 22:23:46 CEST 2013
vlc/vlc-2.1 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Jul 25 23:21:02 2013 +0300| [ecdb6ddfff75c049da540769ffd7ca2f77c244a7] | committer: Rémi Denis-Courmont
ALSA: favor channel maps with fewer unused channels
(cherry picked from commit a9aba401ca8873a814e48458eeee661e5d8bb3cc)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.1.git/?a=commit;h=ecdb6ddfff75c049da540769ffd7ca2f77c244a7
---
modules/audio_output/alsa.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/modules/audio_output/alsa.c b/modules/audio_output/alsa.c
index 2a4d900..5c87c1e 100644
--- a/modules/audio_output/alsa.c
+++ b/modules/audio_output/alsa.c
@@ -241,7 +241,8 @@ static unsigned SetupChannels (vlc_object_t *obj, snd_pcm_t *pcm,
if (chans == -1)
continue;
- unsigned score = popcount (chans & *mask);
+ unsigned score = (popcount (chans & *mask) << 8)
+ | (255 - popcount (chans));
if (score > best_score)
{
best_offset = p - maps;
More information about the vlc-commits
mailing list