diff --git a/gst/audioparsers/gstaacparse.c b/gst/audioparsers/gstaacparse.c
index 57f5aff..acc22e2 100644
--- a/gst/audioparsers/gstaacparse.c
+++ b/gst/audioparsers/gstaacparse.c
@@ -114,6 +114,19 @@ gst_aac_parse_get_sample_rate_from_index (guint sr_idx)
   return 0;
 }
 
+static inline gint
+gst_aac_parse_get_channels_from_index (guint ch_idx)
+{
+  if (ch_idx == 0 || ch_idx > 7)
+    GST_WARNING ("Unsupported channel configuration %u", ch_idx);
+  else if (ch_idx == 7)
+    return 8;
+  else
+    return ch_idx;
+  
+  return 0;
+}
+
 /**
  * gst_aac_parse_base_init:
  * @klass: #GstElementClass.
@@ -679,9 +692,11 @@ gst_aac_parse_parse_adts_header (GstAacParse * aacparse, const guint8 * data,
 
     *rate = gst_aac_parse_get_sample_rate_from_index (sr_idx);
   }
-  if (channels)
-    *channels = ((data[2] & 0x01) << 2) | ((data[3] & 0xc0) >> 6);
-
+  if (channels) {
+    gint ch_idx = ((data[2] & 0x01) << 2) | ((data[3] & 0xc0) >> 6);
+    
+    *channels = gst_aac_parse_get_channels_from_index (ch_idx);
+  }
   if (version)
     *version = (data[1] & 0x08) ? 2 : 4;
   if (object)
