shithub: aacdec

Download patch

ref: 00cea4f4df3c204869b0102a76ec4cfb44ff9e21
parent: 157eb063acc5492fbb9d5e871ba584840124959d
author: knik <knik>
date: Thu Jan 22 04:40:52 EST 2015

Fixed segfaults on amd64 due to incorrect pointer size

--- a/frontend/audio.c
+++ b/frontend/audio.c
@@ -25,7 +25,7 @@
 ** Commercial non-GPL licensing of this software is possible.
 ** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
 **
-** $Id: audio.c,v 1.29 2008/09/19 22:50:17 menno Exp $
+** $Id: audio.c,v 1.30 2015/01/22 09:40:52 knik Exp $
 **/
 
 #ifdef _WIN32
@@ -36,6 +36,8 @@
 #include <fcntl.h>
 #include <math.h>
 #include <neaacdec.h>
+#include <stdint.h>
+
 #include "audio.h"
 
 
@@ -347,7 +349,7 @@
 {
     int ret;
     unsigned int i;
-    long *sample_buffer24 = (long*)sample_buffer;
+    int32_t *sample_buffer24 = (int32_t*)sample_buffer;
     char *data = malloc(samples*aufile->bits_per_sample*sizeof(char)/8);
 
     aufile->total_samples += samples;
@@ -391,7 +393,7 @@
 {
     int ret;
     unsigned int i;
-    long *sample_buffer32 = (long*)sample_buffer;
+    int32_t *sample_buffer32 = (int32_t*)sample_buffer;
     char *data = malloc(samples*aufile->bits_per_sample*sizeof(char)/8);
 
     aufile->total_samples += samples;