diff options
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; } /*********************************************************************** |