ext/vorbis/vorbisdec.c: Don't arbitrarily restrict channel counts and rate in vorbis.
authorMichael Smith <msmith@xiph.org>
Fri, 2 Jun 2006 14:23:34 +0000 (14:23 +0000)
committerMichael Smith <msmith@xiph.org>
Fri, 2 Jun 2006 14:23:34 +0000 (14:23 +0000)
Original commit message from CVS:
* ext/vorbis/vorbisdec.c: (vorbis_handle_identification_packet):
Don't arbitrarily restrict channel counts and rate in vorbis.
In terms of effects likely on real-world files, this fixes 96kHz
playback of vorbis.

ChangeLog
ext/vorbis/vorbisdec.c

index 55e5742..99c03f6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2006-06-02  Michael Smith  <msmith@fluendo.com>
 
+       * ext/vorbis/vorbisdec.c: (vorbis_handle_identification_packet):
+         Don't arbitrarily restrict channel counts and rate in vorbis.
+         In terms of effects likely on real-world files, this fixes 96kHz
+         playback of vorbis.
+
+2006-06-02  Michael Smith  <msmith@fluendo.com>
+
        * gst/audioconvert/audioconvert.c: (float):
          More correct float->int conversion.
 
index 769b261..5dc479d 100644 (file)
@@ -65,8 +65,8 @@ GST_STATIC_PAD_TEMPLATE ("src",
     GST_PAD_SRC,
     GST_PAD_ALWAYS,
     GST_STATIC_CAPS ("audio/x-raw-float, "
-        "rate = (int) [ 8000, 50000 ], "
-        "channels = (int) [ 1, 6 ], " "endianness = (int) BYTE_ORDER, "
+        "rate = (int) [ 1, MAX ], "
+        "channels = (int) [ 1, 256 ], " "endianness = (int) BYTE_ORDER, "
 /* no ifdef in macros, please
 #ifdef GST_VORBIS_DEC_SEQUENTIAL
       "layout = \"sequential\", "
@@ -607,8 +607,6 @@ vorbis_handle_identification_packet (GstVorbisDec * vd)
       pos = pos6;
       break;
     }
-    default:
-      goto channel_count_error;
   }
 
   caps = gst_caps_new_simple ("audio/x-raw-float",
@@ -623,14 +621,6 @@ vorbis_handle_identification_packet (GstVorbisDec * vd)
   gst_caps_unref (caps);
 
   return GST_FLOW_OK;
-
-  /* ERROR */
-channel_count_error:
-  {
-    GST_ELEMENT_ERROR (vd, STREAM, NOT_IMPLEMENTED, (NULL),
-        ("Unsupported channel count %d", vd->vi.channels));
-    return GST_FLOW_ERROR;
-  }
 }
 
 static GstFlowReturn