From ad64d48f17335e820d7a0a563a88436f38ccb813 Mon Sep 17 00:00:00 2001 From: Anton Mitrofanov Date: Tue, 23 Feb 2010 09:10:26 -0800 Subject: [PATCH] Fix various silly errors in the previous patches --- common/common.c | 2 ++ common/frame.c | 1 + common/x86/mc-a2.asm | 2 +- x264.c | 4 +++- 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/common/common.c b/common/common.c index 04105882..51d89294 100644 --- a/common/common.c +++ b/common/common.c @@ -346,6 +346,7 @@ static int x264_param_apply_tune( x264_param_t *param, const char *tune ) else { fprintf( stderr, "x264 [error]: invalid tune '%s'\n", s ); + x264_free( tmp ); return -1; } if( 0 ) @@ -355,6 +356,7 @@ static int x264_param_apply_tune( x264_param_t *param, const char *tune ) } s = strtok( NULL, ",./-+" ); } + x264_free( tmp ); return 0; } diff --git a/common/frame.c b/common/frame.c index 2798f25c..29a10414 100644 --- a/common/frame.c +++ b/common/frame.c @@ -202,6 +202,7 @@ void x264_frame_delete( x264_frame_t *frame ) x264_free( frame->i_row_bits ); x264_free( frame->i_row_qp ); x264_free( frame->mb_type ); + x264_free( frame->mb_partition ); x264_free( frame->mv[0] ); x264_free( frame->mv[1] ); x264_free( frame->ref[0] ); diff --git a/common/x86/mc-a2.asm b/common/x86/mc-a2.asm index d86d6eff..6343c586 100644 --- a/common/x86/mc-a2.asm +++ b/common/x86/mc-a2.asm @@ -740,7 +740,7 @@ cglobal x264_memzero_aligned_%1, 2,2 mova [r0 + r1 + i], m0 %assign i i+mmsize %endrep - add r1d, mmsize*8 + add r1, mmsize*8 jl .loop REP_RET %endmacro diff --git a/x264.c b/x264.c index b2ab17c7..66f505c1 100644 --- a/x264.c +++ b/x264.c @@ -793,7 +793,7 @@ static int Parse( int argc, char **argv, x264_param_t *param, cli_opt_t *opt ) const char *demuxer = demuxer_names[0]; char *output_filename = NULL; const char *muxer = muxer_names[0]; - x264_param_t defaults = *param; + x264_param_t defaults; char *profile = NULL; int b_thread_input = 0; int b_turbo = 1; @@ -805,6 +805,8 @@ static int Parse( int argc, char **argv, x264_param_t *param, cli_opt_t *opt ) char *preset = NULL; char *tune = NULL; + x264_param_default( &defaults ); + memset( opt, 0, sizeof(cli_opt_t) ); memset( &input_opt, 0, sizeof(cli_input_opt_t) ); opt->b_progress = 1; -- 2.47.3