audio: add debug output if channels mapping does not match

https://bugzilla.gnome.org/show_bug.cgi?id=763985
This commit is contained in:
Guillaume Desmottes 2016-03-21 07:26:50 -04:00 committed by Nicolas Dufresne
parent eef7312169
commit 1c56cfa144

View file

@ -1984,6 +1984,19 @@ gst_audio_ring_buffer_set_channel_positions (GstAudioRingBuffer * buf,
for (i = 0; i < channels; i++) { for (i = 0; i < channels; i++) {
if (buf->channel_reorder_map[i] != 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; buf->need_reorder = TRUE;
break; break;
} }