Commit dbabd8d1 authored by Gildas Bazin's avatar Gildas Bazin

* ./plugins/win32/waveout.c: waveOutUnprepareHeader() was never being
called. This should fix the memory leak some people reported when using
the waveout plugin.
parent 40592166
......@@ -2,7 +2,7 @@
* waveout.c : Windows waveOut plugin for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: waveout.c,v 1.8 2002/06/01 12:32:00 sam Exp $
* $Id: waveout.c,v 1.9 2002/06/03 07:22:36 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -200,6 +200,11 @@ static void aout_Play( aout_thread_t *p_aout, byte_t *p_buffer, int i_size )
p_aout->p_sys->i_current_buffer = (current_buffer + 1) % NUMBUF;
/* Unprepare the old buffer */
waveOutUnprepareHeader( p_aout->p_sys->h_waveout,
&p_aout->p_sys->waveheader[current_buffer],
sizeof(WAVEHDR) );
/* Prepare the buffer */
p_aout->p_sys->waveheader[current_buffer].lpData =
realloc( p_aout->p_sys->waveheader[current_buffer].lpData, i_size );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment