{
pic_out->prop.f_ssim = h->stat.frame.f_ssim / h->stat.frame.i_ssim_cnt;
h->stat.f_ssim_mean_y[h->sh.i_type] += pic_out->prop.f_ssim * dur;
- snprintf( psz_message + strlen(psz_message), 80 - strlen(psz_message),
- " SSIM Y:%.5f", pic_out->prop.f_ssim );
+ int msg_len = strlen(psz_message);
+ snprintf( psz_message + msg_len, 80 - msg_len, " SSIM Y:%.5f", pic_out->prop.f_ssim );
}
psz_message[79] = '\0';
x264_log( h, X264_LOG_DEBUG,
- "frame=%4d QP=%.2f NAL=%d Slice:%c Poc:%-3d I:%-4d P:%-4d SKIP:%-4d size=%d bytes%s\n",
+ "frame=%4d QP=%.2f NAL=%d Slice:%c Poc:%-3d I:%-4d P:%-4d SKIP:%-4d size=%d bytes%s\n",
h->i_frame,
h->fdec->f_qp_avg_aq,
h->i_nal_ref_idc,
if( !string )
return NULL;
int sep_count = 0;
+ int sep_len = strlen( sep );
char *tmp = string;
- while( ( tmp = ( tmp = strstr( tmp, sep ) ) ? tmp + strlen( sep ) : 0 ) )
+ while( ( tmp = ( tmp = strstr( tmp, sep ) ) ? tmp + sep_len : 0 ) )
++sep_count;
if( sep_count == 0 )
{
int j = i-1;
if( esc )
esc[0] = '\0';
- split[j] = realloc( split[j], strlen( split[j] ) + strlen( sep ) + strlen( tok ) + 1 );
+ split[j] = realloc( split[j], strlen( split[j] ) + sep_len + strlen( tok ) + 1 );
assert( split[j] );
strcat( split[j], sep );
strcat( split[j], tok );