[MPlayer-cvslog] r22198 - trunk/libmpcodecs/dec_audio.c

uau subversion at mplayerhq.hu
Sat Feb 10 20:47:23 CET 2007


Author: uau
Date: Sat Feb 10 20:47:22 2007
New Revision: 22198

Modified:
   trunk/libmpcodecs/dec_audio.c

Log:
Fix memory leak when changing playback speed


Modified: trunk/libmpcodecs/dec_audio.c
==============================================================================
--- trunk/libmpcodecs/dec_audio.c	(original)
+++ trunk/libmpcodecs/dec_audio.c	Sat Feb 10 20:47:22 2007
@@ -333,6 +333,8 @@
   if(out_maxsize<8192) out_maxsize=MAX_OUTBURST; // not sure this is ok
 
   sh_audio->a_out_buffer_size=out_maxsize;
+  if (sh_audio->a_out_buffer != sh_audio->a_buffer)
+      free(sh_audio->a_out_buffer);
   sh_audio->a_out_buffer=memalign(16,sh_audio->a_out_buffer_size);
   memset(sh_audio->a_out_buffer,0,sh_audio->a_out_buffer_size);
   sh_audio->a_out_buffer_len=0;



More information about the MPlayer-cvslog mailing list