Index: ext/alsa/gstalsasink.c
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-base/ext/alsa/gstalsasink.c,v
retrieving revision 1.93
diff -u -r1.93 gstalsasink.c
--- ext/alsa/gstalsasink.c	3 Mar 2008 06:03:44 -0000	1.93
+++ ext/alsa/gstalsasink.c	7 Mar 2008 11:26:45 -0000
@@ -645,12 +645,9 @@
     case GST_BUFTYPE_MU_LAW:
       alsa->format = SND_PCM_FORMAT_MU_LAW;
       break;
-    case GST_BUFTYPE_NONLINEAR:
+    case GST_BUFTYPE_IEC958:
       alsa->format = SND_PCM_FORMAT_S16_BE;
-      if (G_LIKELY (spec->format == GST_IEC958))
-        alsa->iec958 = TRUE;
-      else
-        goto error;
+      alsa->iec958 = TRUE;
       break;
     default:
       goto error;
@@ -888,8 +885,8 @@
     guint i;
 
     GST_DEBUG_OBJECT (asink, "swapping bytes");
-    for (i = 0; i < length; i += 2) {
-      ptr[i / 2] = GUINT16_SWAP_LE_BE (ptr[i / 2]);
+    for (i = 0; i < length/2; i++) {
+      ptr[i] = GUINT16_SWAP_LE_BE (ptr[i]);
     }
   }
 
Index: gst-libs/gst/audio/gstringbuffer.c
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-base/gst-libs/gst/audio/gstringbuffer.c,v
retrieving revision 1.58
diff -u -r1.58 gstringbuffer.c
--- gst-libs/gst/audio/gstringbuffer.c	29 Feb 2008 18:44:36 -0000	1.58
+++ gst-libs/gst/audio/gstringbuffer.c	7 Mar 2008 11:26:45 -0000
@@ -380,7 +380,7 @@
     if (!(gst_structure_get_int (structure, "rate", &spec->rate)))
       goto parse_error;
 
-    spec->type = GST_BUFTYPE_NONLINEAR;
+    spec->type = GST_BUFTYPE_IEC958;
     spec->format = GST_IEC958;
     spec->width = 16;
     spec->depth = 16;
@@ -390,7 +390,7 @@
     if (!(gst_structure_get_int (structure, "rate", &spec->rate)))
       goto parse_error;
 
-    spec->type = GST_BUFTYPE_NONLINEAR;
+    spec->type = GST_BUFTYPE_AC3;
     spec->format = GST_AC3;
     spec->width = 16;
     spec->depth = 16;
Index: gst-libs/gst/audio/gstringbuffer.h
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-base/gst-libs/gst/audio/gstringbuffer.h,v
retrieving revision 1.29
diff -u -r1.29 gstringbuffer.h
--- gst-libs/gst/audio/gstringbuffer.h	29 Feb 2008 18:44:36 -0000	1.29
+++ gst-libs/gst/audio/gstringbuffer.h	7 Mar 2008 11:26:45 -0000
@@ -90,7 +90,10 @@
  * @GST_BUFTYPE_IMA_ADPCM: samples in ima adpcm
  * @GST_BUFTYPE_MPEG: samples in mpeg audio format
  * @GST_BUFTYPE_GSM: samples in gsm format
- * @GST_BUFTYPE_NONLINEAR: samples in non linear format (ac3, ec3, dts, ...)
+ * @GST_BUFTYPE_IEC958: samples in IEC958 frames (e.g. AC3)
+ * @GST_BUFTYPE_AC3: samples in AC3 format
+ * @GST_BUFTYPE_EAC3: samples in EAC3 format
+ * @GST_BUFTYPE_DTS: samples in DTS format
  *
  * The format of the samples in the ringbuffer.
  */
@@ -103,7 +106,10 @@
   GST_BUFTYPE_IMA_ADPCM,
   GST_BUFTYPE_MPEG,
   GST_BUFTYPE_GSM,
-  GST_BUFTYPE_NONLINEAR
+  GST_BUFTYPE_IEC958,
+  GST_BUFTYPE_AC3,
+  GST_BUFTYPE_EAC3,
+  GST_BUFTYPE_DTS
 } GstBufferFormatType;
 
 typedef enum
@@ -154,7 +160,7 @@
   GST_GSM,
   GST_IEC958,
   GST_AC3,
-  GST_EC3,
+  GST_EAC3,
   GST_DTS
 } GstBufferFormat;
 
