summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Otte <otte@gnome.org>2005-06-01 12:32:22 +0000
committerBenjamin Otte <otte@gnome.org>2005-06-01 12:32:22 +0000
commit356ee43b06d604df83e7d4abe0e9a94d50713f9b (patch)
treecb44f63b9cff683834ffc1f60f67abf7f2612276
parent2a3eb55df45034723a53f9c6c46feb7fe273d250 (diff)
downloadgst-plugins-bad-356ee43b06d604df83e7d4abe0e9a94d50713f9b.tar.gz
gst-plugins-bad-356ee43b06d604df83e7d4abe0e9a94d50713f9b.tar.bz2
gst-plugins-bad-356ee43b06d604df83e7d4abe0e9a94d50713f9b.zip
gst-libs/gst/audio/multichannel.c: It might help if you want to blame caps for slowness to add the same channel posit...
Original commit message from CVS: * gst-libs/gst/audio/multichannel.c: (gst_audio_set_structure_channel_positions_list): It might help if you want to blame caps for slowness to add the same channel positions n times, but it's not really useful. And now the core warns about it too, that bastard. * gst/typefind/gsttypefindfunctions.c: (plugin_init): Detect midi files.
-rw-r--r--ChangeLog10
-rw-r--r--gst-libs/gst/audio/multichannel.c16
2 files changed, 17 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index a21953c0..9282c6e7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2005-06-01 Benjamin Otte <in7y118@public.uni-hamburg.de>
+
+ * gst-libs/gst/audio/multichannel.c:
+ (gst_audio_set_structure_channel_positions_list):
+ It might help if you want to blame caps for slowness to add the same
+ channel positions n times, but it's not really useful. And now the
+ core warns about it too, that bastard.
+ * gst/typefind/gsttypefindfunctions.c: (plugin_init):
+ Detect midi files.
+
2005-05-29 David Schleef <ds@schleef.org>
* sys/glsink/glimagesink.c: (plugin_init): Change rank from
diff --git a/gst-libs/gst/audio/multichannel.c b/gst-libs/gst/audio/multichannel.c
index 67c055d9..61d7403e 100644
--- a/gst-libs/gst/audio/multichannel.c
+++ b/gst-libs/gst/audio/multichannel.c
@@ -256,7 +256,7 @@ void
gst_audio_set_structure_channel_positions_list (GstStructure * str,
const GstAudioChannelPosition * pos, gint num_positions)
{
- gint channels, n, c;
+ gint channels, c;
GValue pos_val_arr = { 0 }, pos_val_list = {
0}, pos_val_entry = {
0};
@@ -278,15 +278,13 @@ gst_audio_set_structure_channel_positions_list (GstStructure * str,
/* create the array of lists */
g_value_init (&pos_val_arr, GST_TYPE_FIXED_LIST);
g_value_init (&pos_val_entry, GST_TYPE_AUDIO_CHANNEL_POSITION);
- for (n = 0; n < channels; n++) {
- g_value_init (&pos_val_list, GST_TYPE_LIST);
- for (c = 0; c < num_positions; c++) {
- g_value_set_enum (&pos_val_entry, pos[c]);
- gst_value_list_append_value (&pos_val_list, &pos_val_entry);
- }
- gst_value_list_append_value (&pos_val_arr, &pos_val_list);
- g_value_unset (&pos_val_list);
+ g_value_init (&pos_val_list, GST_TYPE_LIST);
+ for (c = 0; c < num_positions; c++) {
+ g_value_set_enum (&pos_val_entry, pos[c]);
+ gst_value_list_append_value (&pos_val_list, &pos_val_entry);
}
+ gst_value_list_append_value (&pos_val_arr, &pos_val_list);
+ g_value_unset (&pos_val_list);
g_value_unset (&pos_val_entry);
gst_structure_set_value (str, GST_AUDIO_CHANNEL_POSITIONS_PROPERTY_NAME,
&pos_val_arr);