riff-media: Fix array read

nbchannels ranges from 1 to 8, therefore use '- 1' to get the proper
array value.
This commit is contained in:
Edward Hervey 2013-12-30 13:46:34 +01:00
parent ed59e06c57
commit 213596cc85

View file

@ -1133,7 +1133,7 @@ gst_riff_wave_add_default_channel_mask (GstCaps * caps,
}
if (channel_reorder_map)
memcpy (channel_reorder_map, reorder_maps[nchannels],
memcpy (channel_reorder_map, reorder_maps[nchannels - 1],
sizeof (gint) * nchannels);
gst_caps_set_simple (caps, "channel-mask", GST_TYPE_BITMASK, channel_mask,