[0.11] gst-plugins-base: riff: don't use NULL arrays

Wim Taymans wtay at kemper.freedesktop.org
Thu Jan 5 03:32:22 PST 2012


Module: gst-plugins-base
Branch: 0.11
Commit: 1317811af6aff7e30bea87d72e34a79d46484b4f
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=1317811af6aff7e30bea87d72e34a79d46484b4f

Author: Wim Taymans <wim.taymans at collabora.co.uk>
Date:   Thu Jan  5 12:31:51 2012 +0100

riff: don't use NULL arrays

---

 gst-libs/gst/riff/riff-media.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/gst-libs/gst/riff/riff-media.c b/gst-libs/gst/riff/riff-media.c
index f67a9df..f3630af 100644
--- a/gst-libs/gst/riff/riff-media.c
+++ b/gst-libs/gst/riff/riff-media.c
@@ -1147,8 +1147,9 @@ gst_riff_create_audio_caps (guint16 codec_id,
   gint channels_max = 2;
   gint i;
 
-  for (i = 0; i < 18; i++)
-    channel_reorder_map[i] = -1;
+  if (channel_reorder_map)
+    for (i = 0; i < 18; i++)
+      channel_reorder_map[i] = -1;
 
   switch (codec_id) {
     case GST_RIFF_WAVE_FORMAT_PCM:     /* PCM */



More information about the gstreamer-commits mailing list