From e3c9a83c0fcc412d7ce0d41edd0d019e0badadfb Mon Sep 17 00:00:00 2001 From: dynaflash Date: Thu, 27 Sep 2007 16:15:55 +0000 Subject: [PATCH] Fixes encx264.c from rev 994 to avoid crasing with 2pass and auto select / forced subtitiles. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@995 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- libhb/encx264.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libhb/encx264.c b/libhb/encx264.c index a061cf1f3..0de2e9f3b 100644 --- a/libhb/encx264.c +++ b/libhb/encx264.c @@ -97,9 +97,9 @@ int encx264Init( hb_work_object_t * w, hb_job_t * job ) Merritt implemented in the Mplayer/Mencoder project. */ - char *x264opts = strdup(job->x264opts); - if( x264opts != NULL && *x264opts != '\0' ) + if( job->x264opts != NULL && *job->x264opts != '\0' ) { + char *x264opts = strdup(job->x264opts); while( *x264opts ) { char *name = x264opts; @@ -161,8 +161,8 @@ int encx264Init( hb_work_object_t * w, hb_job_t * job ) if( ret == X264_PARAM_BAD_VALUE ) hb_log( "x264 options: Bad argument %s=%s", name, value ? value : "(null)" ); } + free(x264opts); } - free(x264opts); if( job->pixel_ratio ) -- 2.40.0