From a1e59086ba3d757cf36e3166d86bed8b079046d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Tue, 19 Feb 2008 20:36:58 +0000 Subject: [PATCH] gst-libs/gst/audio/multichannel.c: Give more useful warning messages if one of the channel layout enums passed to us ... Original commit message from CVS: * gst-libs/gst/audio/multichannel.c: (gst_audio_check_channel_positions), (add_list_to_struct): Give more useful warning messages if one of the channel layout enums passed to us is invalid and if the "channels" field in the caps has a GType we don't expect. --- ChangeLog | 8 ++++++++ gst-libs/gst/audio/multichannel.c | 5 +++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index e859a1d9b5..5df9635f39 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-02-19 Tim-Philipp Müller + + * gst-libs/gst/audio/multichannel.c: + (gst_audio_check_channel_positions), (add_list_to_struct): + Give more useful warning messages if one of the channel + layout enums passed to us is invalid and if the "channels" + field in the caps has a GType we don't expect. + 2008-02-19 Tim-Philipp Müller * gst-libs/gst/audio/multichannel.c: diff --git a/gst-libs/gst/audio/multichannel.c b/gst-libs/gst/audio/multichannel.c index 2e746a6f78..31ccd70f92 100644 --- a/gst-libs/gst/audio/multichannel.c +++ b/gst-libs/gst/audio/multichannel.c @@ -71,7 +71,7 @@ gst_audio_check_channel_positions (const GstAudioChannelPosition * pos, for (n = 0; n < channels; n++) { if (pos[n] <= GST_AUDIO_CHANNEL_POSITION_INVALID || pos[n] >= GST_AUDIO_CHANNEL_POSITION_NUM) { - g_warning ("Channel position %d is invalid, not allowed", n); + g_warning ("Channel position %d for channel %d is invalid", pos[n], n); return FALSE; } } @@ -440,7 +440,8 @@ add_list_to_struct (GstStructure * str, gst_caps_append_structure (caps, str); } } else { - g_warning ("Unknown value type for channels property"); + g_warning ("Unexpected value type '%s' for channels property", + GST_STR_NULL (g_type_name (G_VALUE_TYPE (chan_val)))); } return caps;