All pastes #961358 Raw Edit

Something

public diff v1 · immutable
#961358 ·published 2008-03-28 20:52 UTC
rendered paste body
diff --git a/encoder/ratecontrol.c b/encoder/ratecontrol.cindex 0c8a6d7..bd20f01 100644--- a/encoder/ratecontrol.c+++ b/encoder/ratecontrol.c@@ -470,7 +470,7 @@ int x264_ratecontrol_new( x264_t *h ) static int parse_zone( x264_t *h, x264_zone_t *z, char *p ) {     int len = 0;-    char *tok, *saveptr;+    char *tok;     z->param = NULL;     z->f_bitrate_factor = 1;     if( 3 <= sscanf(p, "%u,%u,q=%u%n", &z->i_start, &z->i_end, &z->i_qp, &len) )@@ -489,7 +489,7 @@ static int parse_zone( x264_t *h, x264_zone_t *z, char *p )         return 0;     z->param = malloc( sizeof(x264_param_t) );     memcpy( z->param, &h->param, sizeof(x264_param_t) );-    while( (tok = strtok_r( p, ",", &saveptr )) )+    while( (tok = strtok_r( p, ",", NULL )) )     {         char *val = strchr( tok, '=' );         if( val )@@ -513,7 +513,7 @@ static int parse_zones( x264_t *h )     int i;     if( h->param.rc.psz_zones && !h->param.rc.i_zones )     {-        char *p, *tok, *saveptr;+        char *p, *tok;         char *psz_zones = x264_malloc( strlen(h->param.rc.psz_zones)+1 );         strcpy( psz_zones, h->param.rc.psz_zones );         h->param.rc.i_zones = 1;@@ -523,7 +523,7 @@ static int parse_zones( x264_t *h )         p = psz_zones;         for( i = 0; i < h->param.rc.i_zones; i++ )         {-            tok = strtok_r( p, "/", &saveptr );+            tok = strtok_r( p, "/", NULL );             if( !tok || parse_zone( h, &h->param.rc.zones[i], tok ) )                 return -1;             p = NULL;