From: Steven Walters Date: Mon, 9 Nov 2009 06:18:35 +0000 (-0800) Subject: Fix weightp logfile parsing on MinGW X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b305297084738ef84a3c60d53f001734b1dd96f5;p=libx264 Fix weightp logfile parsing on MinGW --- diff --git a/encoder/ratecontrol.c b/encoder/ratecontrol.c index 22b50674..1b90e59a 100644 --- a/encoder/ratecontrol.c +++ b/encoder/ratecontrol.c @@ -50,8 +50,8 @@ typedef struct int s_count; float blurred_complexity; char direct_mode; - int8_t weight[2]; - int8_t i_weight_denom; + int16_t weight[2]; + int16_t i_weight_denom; int refcount[16]; int refs; } ratecontrol_entry_t; @@ -684,7 +684,7 @@ int x264_ratecontrol_new( x264_t *h ) rce->i_weight_denom = -1; char *w = strchr( p, 'w' ); if( w ) - if( sscanf( w, "w:%hhd,%hhd,%hhd", &rce->i_weight_denom, &rce->weight[0], &rce->weight[1] ) != 3 ) + if( sscanf( w, "w:%hd,%hd,%hd", &rce->i_weight_denom, &rce->weight[0], &rce->weight[1] ) != 3 ) rce->i_weight_denom = -1; switch(pict_type)