From 8b7035c8ff15f14c17b6c019e951226b9eeaca02 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 8 May 2015 19:38:21 +0200 Subject: ao: log reordered versions of channel maps Useful for debugging cases when no standard orders are used. --- audio/out/ao.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'audio/out') diff --git a/audio/out/ao.c b/audio/out/ao.c index c23b22d985..e2d01d65a3 100644 --- a/audio/out/ao.c +++ b/audio/out/ao.c @@ -415,12 +415,19 @@ bool ao_chmap_sel_adjust(struct ao *ao, const struct mp_chmap_sel *s, if (mp_msg_test(ao->log, MSGL_DEBUG)) { for (int i = 0; i < s->num_chmaps; i++) { struct mp_chmap c = s->chmaps[i]; - MP_DBG(ao, "chmap_sel #%d: %s\n", i, mp_chmap_to_str(&c)); + struct mp_chmap cr = c; + mp_chmap_reorder_norm(&cr); + MP_DBG(ao, "chmap_sel #%d: %s (%s)\n", i, mp_chmap_to_str(&c), + mp_chmap_to_str(&cr)); } } bool r = mp_chmap_sel_adjust(s, map); - if (r) - MP_DBG(ao, "result: %s\n", mp_chmap_to_str(map)); + if (r) { + struct mp_chmap mapr = *map; + mp_chmap_reorder_norm(&mapr); + MP_DBG(ao, "result: %s (%s)\n", mp_chmap_to_str(map), + mp_chmap_to_str(&mapr)); + } return r; } -- cgit v1.2.3