Commit d6aa586b authored by Anton Mitrofanov's avatar Anton Mitrofanov

mp4: Fix file handle leak

parent 942e4e45
......@@ -169,8 +169,9 @@ static int open_file( char *psz_filename, hnd_t *p_handle, cli_output_opt_t *opt
FILE *fh = x264_fopen( psz_filename, "w" );
if( !fh )
return -1;
FAIL_IF_ERR( !x264_is_regular_file( fh ), "mp4", "MP4 output is incompatible with non-regular file `%s'\n", psz_filename )
int b_regular = x264_is_regular_file( fh );
fclose( fh );
FAIL_IF_ERR( !b_regular, "mp4", "MP4 output is incompatible with non-regular file `%s'\n", psz_filename )
mp4_hnd_t *p_mp4 = calloc( 1, sizeof(mp4_hnd_t) );
if( !p_mp4 )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment