commit e6285aaae64e7ada437e83afadb08abba06baa6a
Author: Edward Hervey <bilboed@bilboed.com>
Date:   Sun Mar 1 17:35:39 2009 +0100

    gstfaad: And in faad2-2.7, they've actually fixed their header issues.
    
    So let's make sure we pass faad an address containing a big enough region to
    be written to.

diff --git a/ext/faad/gstfaad.c b/ext/faad/gstfaad.c
index b861844..218744b 100644
--- a/ext/faad/gstfaad.c
+++ b/ext/faad/gstfaad.c
@@ -302,7 +302,7 @@ gst_faad_setcaps (GstPad * pad, GstCaps * caps)
   faad->packetised = FALSE;
 
   if ((value = gst_structure_get_value (str, "codec_data"))) {
-    guint32 samplerate;
+    guint64 samplerate;
     guint8 channels;
     guint8 *cdata;
     guint csize;
@@ -323,8 +323,8 @@ gst_faad_setcaps (GstPad * pad, GstCaps * caps)
         ((cdata[1] & 0x78) >> 3));
 
     /* someone forgot that char can be unsigned when writing the API */
-    if ((gint8) faacDecInit2 (faad->handle, cdata, csize, &samplerate,
-            &channels) < 0)
+    if ((gint8) faacDecInit2 (faad->handle, cdata, csize,
+            (guint32 *) & samplerate, &channels) < 0)
       goto init_failed;
 
     if (channels != ((cdata[1] & 0x78) >> 3)) {
@@ -1284,7 +1284,7 @@ gst_faad_chain (GstPad * pad, GstBuffer * buffer)
 
   /* init if not already done during capsnego */
   if (!faad->init) {
-    guint32 rate;
+    guint64 rate;
     guint8 ch;
 
     GST_DEBUG_OBJECT (faad, "initialising ...");
@@ -1292,14 +1292,15 @@ gst_faad_chain (GstPad * pad, GstBuffer * buffer)
      * appropriate initialisation info... if not, we use our fake_codec_data
      */
     if (looks_like_valid_header (input_data, input_size) || !faad->packetised) {
-      if (faacDecInit (faad->handle, input_data, input_size, &rate, &ch) < 0)
+      if (faacDecInit (faad->handle, input_data, input_size, (guint32 *) & rate,
+              &ch) < 0)
         goto init_failed;
 
       GST_DEBUG_OBJECT (faad, "faacDecInit() ok: rate=%u,channels=%u", rate,
           ch);
     } else {
       if ((gint8) faacDecInit2 (faad->handle, faad->fake_codec_data, 2,
-              &rate, &ch) < 0) {
+              (guint32 *) & rate, &ch) < 0) {
         goto init2_failed;
       }
       GST_DEBUG_OBJECT (faad, "faacDecInit2() ok: rate=%u,channels=%u", rate,
