diff options
author | saintdev <[email protected]> | 2007-03-31 06:55:02 +0000 |
---|---|---|
committer | saintdev <[email protected]> | 2007-03-31 06:55:02 +0000 |
commit | 2338338511e4b1ef3ec5e85606900a846efa2b42 (patch) | |
tree | c33957efc6c20bd8a2cab6c30bbb689b3e5b88fd /libhb/encavcodec.c | |
parent | 18cd105e9a40beccc264178dba69b8b89926a121 (diff) |
Fix about 156,199 bytes of leaked memory.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@469 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/encavcodec.c')
-rw-r--r-- | libhb/encavcodec.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libhb/encavcodec.c b/libhb/encavcodec.c index c71c8384e..721644fbe 100644 --- a/libhb/encavcodec.c +++ b/libhb/encavcodec.c @@ -151,12 +151,16 @@ void encavcodecClose( hb_work_object_t * w ) if( pv->context ) { hb_log( "encavcodec: closing libavcodec" ); + avcodec_flush_buffers( pv->context ); avcodec_close( pv->context ); + free( pv->context ); } if( pv->file ) { fclose( pv->file ); } + free( pv ); + w->private_data = NULL; } /*********************************************************************** |