Index: libhb/work.c =================================================================== --- libhb/work.c (revision 486) +++ libhb/work.c (working copy) @@ -6,6 +6,8 @@ #include "hb.h" +static char *x264opts2 = NULL; + typedef struct { hb_list_t * jobs; @@ -60,6 +62,9 @@ *(work->error) = HB_ERROR_NONE; free( work ); + + if( x264opts2 ) free (x264opts2 ); + } static hb_work_object_t * getWork( int id ) @@ -102,7 +107,16 @@ title = job->title; job->list_work = hb_list_init(); - + + if((job->pass == 1) && (job->x264opts)) + { + x264opts2 = strdup(job->x264opts); + } + if((job->pass == 2) && (x264opts2 != NULL)) + { + job->x264opts = x264opts2; + } + hb_log( "starting job" ); hb_log( " + device %s", title->dvd ); hb_log( " + title %d, chapter(s) %d to %d", title->index,