tags 558399 patch
thanks

Hi,

normalize-audio must use afGetVirtualFrameSize instead of afGetFrameSize. Otherwise the allocated buffer size will be too small if the wav file is compressed.

Cheers,
Stefan
--- normalize-audio-0.7.7.orig/src/adjust.c
+++ normalize-audio-0.7.7/src/adjust.c
@@ -277,8 +277,8 @@
 
   /* set up buffer to hold 1/100 of a second worth of frames */
   frames_in_buf = samp_rate / 100;
-  src_framesz = afGetFrameSize(fhin, AF_DEFAULT_TRACK, 1);
-  dst_framesz = afGetFrameSize(fhout, AF_DEFAULT_TRACK, 1);
+  src_framesz = afGetVirtualFrameSize(fhin, AF_DEFAULT_TRACK, 1);
+  dst_framesz = afGetVirtualFrameSize(fhout, AF_DEFAULT_TRACK, 1);
   src_buf = (unsigned char *)xmalloc(frames_in_buf * src_framesz);
   dst_buf = (unsigned char *)xmalloc(frames_in_buf * dst_framesz);
 

Reply via email to