Commit 073c4afd authored by Laurent Aimar's avatar Laurent Aimar

* all: shut up valgrind ;) (memory leacks and one overead/overwrite).

parent 14d8d6e1
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* avi.c : AVI file Stream input module for vlc * avi.c : AVI file Stream input module for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: avi.c,v 1.45 2003/04/28 23:25:50 fenrir Exp $ * $Id: avi.c,v 1.46 2003/05/03 01:12:13 fenrir Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
...@@ -1248,6 +1248,10 @@ static int AVIInit( vlc_object_t * p_this ) ...@@ -1248,6 +1248,10 @@ static int AVIInit( vlc_object_t * p_this )
p_es->i_cat = p_info->i_cat; p_es->i_cat = p_info->i_cat;
if( p_es->i_cat == AUDIO_ES ) if( p_es->i_cat == AUDIO_ES )
{ {
if( i_init_size < sizeof( WAVEFORMATEX ) )
{
i_init_size = sizeof( WAVEFORMATEX );
}
p_es->p_waveformatex = malloc( i_init_size ); p_es->p_waveformatex = malloc( i_init_size );
memcpy( p_es->p_waveformatex, p_init_data, i_init_size ); memcpy( p_es->p_waveformatex, p_init_data, i_init_size );
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* avi.h : AVI file Stream input module for vlc * avi.h : AVI file Stream input module for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: avi.h,v 1.9 2003/04/27 11:55:03 fenrir Exp $ * $Id: avi.h,v 1.10 2003/05/03 01:12:13 fenrir Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* libavi.c : * libavi.c :
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: libavi.c,v 1.19 2003/04/27 13:55:51 fenrir Exp $ * $Id: libavi.c,v 1.20 2003/05/03 01:12:13 fenrir Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
...@@ -527,7 +527,7 @@ static int AVI_ChunkRead_strf( input_thread_t *p_input, ...@@ -527,7 +527,7 @@ static int AVI_ChunkRead_strf( input_thread_t *p_input,
{ {
case( AVIFOURCC_auds ): case( AVIFOURCC_auds ):
p_chk->strf.auds.i_cat = AUDIO_ES; p_chk->strf.auds.i_cat = AUDIO_ES;
p_chk->strf.auds.p_wf = malloc( p_chk->common.i_chunk_size ); p_chk->strf.auds.p_wf = malloc( __MAX( p_chk->common.i_chunk_size, sizeof( WAVEFORMATEX ) ) );
AVI_READ2BYTES( p_chk->strf.auds.p_wf->wFormatTag ); AVI_READ2BYTES( p_chk->strf.auds.p_wf->wFormatTag );
AVI_READ2BYTES( p_chk->strf.auds.p_wf->nChannels ); AVI_READ2BYTES( p_chk->strf.auds.p_wf->nChannels );
AVI_READ4BYTES( p_chk->strf.auds.p_wf->nSamplesPerSec ); AVI_READ4BYTES( p_chk->strf.auds.p_wf->nSamplesPerSec );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* copy.c * copy.c
***************************************************************************** *****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN * Copyright (C) 2001, 2002 VideoLAN
* $Id: copy.c,v 1.8 2003/05/02 00:33:42 fenrir Exp $ * $Id: copy.c,v 1.9 2003/05/03 01:12:13 fenrir Exp $
* *
* Authors: Laurent Aimar <fenrir@via.ecp.fr> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Eric Petit <titer@videolan.org> * Eric Petit <titer@videolan.org>
...@@ -542,6 +542,7 @@ static void EndThread ( packetizer_thread_t *p_pack) ...@@ -542,6 +542,7 @@ static void EndThread ( packetizer_thread_t *p_pack)
{ {
sout_InputDelete( p_pack->p_sout_input ); sout_InputDelete( p_pack->p_sout_input );
} }
free( p_pack );
} }
static void input_ShowPES( decoder_fifo_t *p_fifo, pes_packet_t **pp_pes ) static void input_ShowPES( decoder_fifo_t *p_fifo, pes_packet_t **pp_pes )
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* transcode.c * transcode.c
***************************************************************************** *****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN * Copyright (C) 2001, 2002 VideoLAN
* $Id: transcode.c,v 1.9 2003/05/02 19:37:08 fenrir Exp $ * $Id: transcode.c,v 1.10 2003/05/03 01:12:13 fenrir Exp $
* *
* Authors: Laurent Aimar <fenrir@via.ecp.fr> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* *
...@@ -585,7 +585,9 @@ static void transcode_audio_ffmpeg_close ( sout_stream_t *p_stream, sout_stream_ ...@@ -585,7 +585,9 @@ static void transcode_audio_ffmpeg_close ( sout_stream_t *p_stream, sout_stream_
free( id->ff_dec_c ); free( id->ff_dec_c );
free( id->ff_enc_c ); free( id->ff_enc_c );
free( id->p_buffer_in );
free( id->p_buffer ); free( id->p_buffer );
free( id->p_buffer_out );
} }
static int transcode_audio_ffmpeg_process( sout_stream_t *p_stream, sout_stream_id_t *id, static int transcode_audio_ffmpeg_process( sout_stream_t *p_stream, sout_stream_id_t *id,
......
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