Fix a few more minor memleaks
authorFiona Glaser <fiona@x264.com>
Tue, 29 Jul 2008 19:42:41 +0000 (13:42 -0600)
committerFiona Glaser <fiona@x264.com>
Tue, 29 Jul 2008 21:02:47 +0000 (15:02 -0600)
muxers.c
x264.c

index c16b2ff..bb2643c 100644 (file)
--- a/muxers.c
+++ b/muxers.c
@@ -503,6 +503,8 @@ int close_file_thread( hnd_t handle )
     thread_input_t *h = handle;
     h->p_close_infile( h->p_handle );
     x264_picture_clean( &h->pic );
+    x264_pthread_join( h->tid, NULL );
+    free( h->next_args );
     free( h );
     return 0;
 }
diff --git a/x264.c b/x264.c
index 5741d00..b4b832e 100644 (file)
--- a/x264.c
+++ b/x264.c
@@ -852,6 +852,7 @@ static int  Encode( x264_param_t *param, cli_opt_t *opt )
     i_end = x264_mdate();
     x264_picture_clean( &pic );
     x264_encoder_close( h );
+    x264_free( mux_buffer );
     fprintf( stderr, "\n" );
 
     if( b_ctrl_c )