audio: fix previous commit

This would have always forced mono first (if supported by the AO),
instead of stereo.
This commit is contained in:
wm4 2014-12-20 16:48:30 +01:00
parent d07c6566cd
commit 5b32f30aa1
1 changed files with 4 additions and 4 deletions

View File

@ -184,11 +184,11 @@ bool mp_chmap_sel_adjust(const struct mp_chmap_sel *s, struct mp_chmap *map)
}
}
// Fallback to mono/stereo as last resort
*map = (struct mp_chmap) MP_CHMAP_INIT_MONO;
if (map->num == 1 && test_layout(s, map))
return true;
*map = (struct mp_chmap) MP_CHMAP_INIT_STEREO;
if (map->num >= 2 && test_layout(s, map))
if (test_layout(s, map))
return true;
*map = (struct mp_chmap) MP_CHMAP_INIT_MONO;
if (test_layout(s, map))
return true;
*map = (struct mp_chmap) {0};
return false;