diff --git a/ext/faad/gstfaad.c b/ext/faad/gstfaad.c
index b861844..8127c45 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,7 +323,7 @@ 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,
+    if ((gint8) faacDecInit2 (faad->handle, cdata, csize, (guint32*) &samplerate,
             &channels) < 0)
       goto init_failed;
 
