From 1c56cfa1440516cfd9ab6abaac5a7d80f4b587ce Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Mon, 21 Mar 2016 07:26:50 -0400 Subject: [PATCH] audio: add debug output if channels mapping does not match https://bugzilla.gnome.org/show_bug.cgi?id=763985 --- gst-libs/gst/audio/gstaudioringbuffer.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/gst-libs/gst/audio/gstaudioringbuffer.c b/gst-libs/gst/audio/gstaudioringbuffer.c index 246c6f6..08bb38b 100644 --- a/gst-libs/gst/audio/gstaudioringbuffer.c +++ b/gst-libs/gst/audio/gstaudioringbuffer.c @@ -1984,6 +1984,19 @@ gst_audio_ring_buffer_set_channel_positions (GstAudioRingBuffer * buf, for (i = 0; i < channels; i++) { if (buf->channel_reorder_map[i] != i) { +#ifndef GST_DISABLE_GST_DEBUG + { + gchar *tmp1, *tmp2; + + tmp1 = gst_audio_channel_positions_to_string (position, channels); + tmp2 = gst_audio_channel_positions_to_string (to, channels); + GST_LOG_OBJECT (buf, "may have to reorder channels: %s -> %s", tmp1, + tmp2); + g_free (tmp1); + g_free (tmp2); + } +#endif /* GST_DISABLE_GST_DEBUG */ + buf->need_reorder = TRUE; break; } -- 2.7.4