Public feed #721718

Stuff

public text v1 · immutable
Raw Edit
·published 2007-10-01 14:30 UTC
rendered paste body
Index: libhb/encx264.c
===================================================================
--- libhb/encx264.c	(revision 997)
+++ libhb/encx264.c	(working copy)
@@ -99,7 +99,10 @@
 
     if( job->x264opts != NULL && *job->x264opts != '\0' )
     {
+        /* Work with a duplicate so user interfaces can still reference the job's
+           options after they've been parsed. */
         char *x264opts = strdup(job->x264opts);
+        char *temp = x264opts;
         while( *x264opts )
         {
             char *name = x264opts;
@@ -161,7 +164,7 @@
             if( ret == X264_PARAM_BAD_VALUE )
                 hb_log( "x264 options: Bad argument %s=%s", name, value ? value : "(null)" );
         }
-        free(x264opts);
+        free(temp);
     }