Public feed
#721682
Index: libhb/encx264.c
===================================================================
--- libhb/encx264.c (revision 997)
+++ libhb/encx264.c (working copy)
@@ -99,7 +99,9 @@
if( job->x264opts != NULL && *job->x264opts != '\0' )
{
+ /* Work on a duplicate to prevent modifying the original */
char *x264opts = strdup(job->x264opts);
+ char *temp = x264opts;
while( *x264opts )
{
char *name = x264opts;
@@ -161,7 +163,7 @@
if( ret == X264_PARAM_BAD_VALUE )
hb_log( "x264 options: Bad argument %s=%s", name, value ? value : "(null)" );
}
- free(x264opts);
+ free(temp);
}