diff options
author | saintdev <[email protected]> | 2007-04-01 04:47:47 +0000 |
---|---|---|
committer | saintdev <[email protected]> | 2007-04-01 04:47:47 +0000 |
commit | 6aadb0780a8cab83a9cef4ff2c179c6b318669ab (patch) | |
tree | ec230a8d6c1d22aa9e1df1745f6afc948aa8d0b5 | |
parent | 2338338511e4b1ef3ec5e85606900a846efa2b42 (diff) |
Fix several MB of memory leaks in lame, and vorbis.
6ch Vorbis doesn't seem quite ready for prime time.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@470 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | libhb/enclame.c | 7 | ||||
-rw-r--r-- | libhb/encvorbis.c | 12 | ||||
-rw-r--r-- | libhb/encxvid.c | 3 | ||||
-rw-r--r-- | libhb/muxogm.c | 3 | ||||
-rw-r--r-- | test/test.c | 5 |
5 files changed, 28 insertions, 2 deletions
diff --git a/libhb/enclame.c b/libhb/enclame.c index c0b0f9df0..33cfa14c8 100644 --- a/libhb/enclame.c +++ b/libhb/enclame.c @@ -68,6 +68,13 @@ int enclameInit( hb_work_object_t * w, hb_job_t * job ) **********************************************************************/ void enclameClose( hb_work_object_t * w ) { + hb_work_private_t * pv = w->private_data; + + lame_close( pv->lame ); + hb_list_empty( &pv->list ); + free( pv->buf ); + free( pv ); + w->private_data = NULL; } /*********************************************************************** diff --git a/libhb/encvorbis.c b/libhb/encvorbis.c index 01c71e844..169cb938f 100644 --- a/libhb/encvorbis.c +++ b/libhb/encvorbis.c @@ -120,6 +120,18 @@ int encvorbisInit( hb_work_object_t * w, hb_job_t * job ) **********************************************************************/ void encvorbisClose( hb_work_object_t * w ) { + hb_work_private_t * pv = w->private_data; + + vorbis_block_clear( &pv->vb ); + vorbis_dsp_clear( &pv->vd ); + vorbis_comment_clear( &pv->vc ); + vorbis_info_clear( &pv->vi ); + + hb_list_empty( &pv->list ); + + free( pv->buf ); + free( pv ); + w->private_data = NULL; } /*********************************************************************** diff --git a/libhb/encxvid.c b/libhb/encxvid.c index 7768f8e12..6d869ae36 100644 --- a/libhb/encxvid.c +++ b/libhb/encxvid.c @@ -131,6 +131,9 @@ void encxvidClose( hb_work_object_t * w ) hb_log( "encxvid: closing libxvidcore" ); xvid_encore( pv->xvid, XVID_ENC_DESTROY, NULL, NULL); } + + free( pv ); + w->private_data = NULL; } /*********************************************************************** diff --git a/libhb/muxogm.c b/libhb/muxogm.c index 6a3b1ec5d..656c8e780 100644 --- a/libhb/muxogm.c +++ b/libhb/muxogm.c @@ -336,6 +336,8 @@ static int OGMEnd( hb_mux_object_t * m ) { return -1; } + ogg_stream_clear( &mux_data->os ); + for( i = 0; i < hb_list_count( title->list_audio ); i++ ) { audio = hb_list_item( title->list_audio, i ); @@ -344,6 +346,7 @@ static int OGMEnd( hb_mux_object_t * m ) { return -1; } + ogg_stream_clear( &mux_data->os ); } fclose( m->file ); diff --git a/test/test.c b/test/test.c index 818ceeae7..30eeb4ddf 100644 --- a/test/test.c +++ b/test/test.c @@ -980,9 +980,10 @@ static int CheckOptions( int argc, char ** argv ) }
}
- if (acodec != HB_ACODEC_FAAC && acodec != HB_ACODEC_VORBIS)
+ if (acodec != HB_ACODEC_FAAC)
{
- /* only attempt 5.1 export if exporting to AAC or Vorbis */
+ /* only attempt 5.1 export if exporting to AAC or Vorbis */ + /* Vorbis doesn't seem to be quite ready yet */
surround = 0;
}
|