]> git.sesse.net Git - x264/blobdiff - muxers.c
2x faster quant. 2% overall.
[x264] / muxers.c
index 97a513bb2ecc7547e21141f3f27ff7566cd96671..f9d0b3dbb72b94c430ca8d33b54baf724f4d0ff4 100644 (file)
--- a/muxers.c
+++ b/muxers.c
@@ -23,6 +23,7 @@
 
 #include <stdio.h>
 #include <string.h>
+#include <sys/types.h>
 
 #include "common/common.h"
 #include "x264.h"
@@ -105,7 +106,9 @@ int close_file_yuv(hnd_t handle)
     yuv_input_t *h = handle;
     if( !h || !h->fh )
         return 0;
-    return fclose(h->fh);
+    fclose( h->fh );
+    free( h );
+    return 0;
 }
 
 /* YUV4MPEG2 raw 420 yuv file operation */
@@ -306,7 +309,9 @@ int close_file_y4m(hnd_t handle)
     y4m_input_t *h = handle;
     if( !h || !h->fh )
         return 0;
-    return fclose(h->fh);
+    fclose( h->fh );
+    free( h );
+    return 0;
 }
 
 /* avs/avi input file support under cygwin */