diff options
author | František Dvořák <valtri@users.sourceforge.net> | 2005-11-21 10:29:57 +0000 |
---|---|---|
committer | František Dvořák <valtri@users.sourceforge.net> | 2005-11-21 10:29:57 +0000 |
commit | 910346b87bc6b0ec88f33c054f05dcd96cddbf78 (patch) | |
tree | f0f0762ad1c92b0d96f04d088b5c023e50f68b25 /src | |
parent | 0db9a40bf814eb4bc2b0041a69d7b58dbe9f913e (diff) | |
download | xine-lib-910346b87bc6b0ec88f33c054f05dcd96cddbf78.tar.gz xine-lib-910346b87bc6b0ec88f33c054f05dcd96cddbf78.tar.bz2 |
*BUGFIX*
Made win32 decoder wrapper happy with valgrind, prevented reading from freed memory.
CVS patchset: 7808
CVS date: 2005/11/21 10:29:57
Diffstat (limited to 'src')
-rw-r--r-- | src/libw32dll/w32codec.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libw32dll/w32codec.c b/src/libw32dll/w32codec.c index d18c05383..1823c9c79 100644 --- a/src/libw32dll/w32codec.c +++ b/src/libw32dll/w32codec.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: w32codec.c,v 1.148 2005/05/15 00:12:44 miguelfreitas Exp $ + * $Id: w32codec.c,v 1.149 2005/11/21 10:29:57 valtri Exp $ * * routines for using w32 codecs * DirectShow support by Miguel Freitas (Nov/2001) @@ -1273,18 +1273,18 @@ static int w32a_init_audio (w32a_decoder_t *this, xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, "w32codec: Recommended source buffer size: %d\n", this->rec_audio_src_size); - if( this->buf ) - free(this->buf); - - if( this->outbuf ) - free(this->outbuf); - if( this->rec_audio_src_size < in_fmt->nBlockAlign ) { this->rec_audio_src_size = in_fmt->nBlockAlign; xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, "w32codec: adjusting source buffer size to %d\n", this->rec_audio_src_size); } + if( this->buf ) + free(this->buf); + + if( this->outbuf ) + free(this->outbuf); + this->max_audio_src_size = 2 * this->rec_audio_src_size; this->buf = malloc( this->max_audio_src_size ); |