From 213596cc852df3dd3169d3ad50e6adb1184dc888 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Mon, 30 Dec 2013 13:46:34 +0100 Subject: [PATCH] riff-media: Fix array read nbchannels ranges from 1 to 8, therefore use '- 1' to get the proper array value. --- gst-libs/gst/riff/riff-media.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst-libs/gst/riff/riff-media.c b/gst-libs/gst/riff/riff-media.c index 08c2c0b24..08b17c9b4 100644 --- a/gst-libs/gst/riff/riff-media.c +++ b/gst-libs/gst/riff/riff-media.c @@ -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, -- 2.34.1