823 |
|
|
824 |
char *ptr; |
char *ptr; |
825 |
char type; |
char type; |
826 |
int fields, nouse; |
int fields; |
827 |
|
|
828 |
lines++; |
lines++; |
829 |
|
|
830 |
/* We skip spaces */ |
/* We skip spaces */ |
831 |
ptr = skipspaces(line); |
ptr = skipspaces(line); |
832 |
|
|
833 |
/* Skip coment lines */ |
/* Skip coment lines or empty lines */ |
834 |
if(iscomment(ptr)) { |
if(iscomment(ptr) || *ptr == '\0') { |
835 |
free(line); |
free(line); |
836 |
continue; |
continue; |
837 |
} |
} |
838 |
|
|
839 |
/* Read the stat line from buffer */ |
/* Read the stat line from buffer */ |
840 |
fields = sscanf(ptr, |
fields = sscanf(ptr, "%c", &type); |
|
"%c %d %d %d %d %d", |
|
|
&type, &nouse, &nouse, &nouse, &nouse, &nouse); |
|
841 |
|
|
842 |
/* Valid stats files have at least 6 fields */ |
/* Valid stats files have at least 6 fields */ |
843 |
if (fields == 6) { |
if (fields == 1) { |
844 |
switch(type) { |
switch(type) { |
845 |
case 'i': |
case 'i': |
846 |
case 'I': |
case 'I': |
899 |
/* We skip spaces */ |
/* We skip spaces */ |
900 |
ptr = skipspaces(line); |
ptr = skipspaces(line); |
901 |
|
|
902 |
/* Skip comment lines */ |
/* Skip comment lines or empty lines */ |
903 |
if(iscomment(ptr)) { |
if(iscomment(ptr) || *ptr == '\0') { |
904 |
free(line); |
free(line); |
905 |
continue; |
continue; |
906 |
} |
} |
1276 |
} else { |
} else { |
1277 |
rc->avg_length[i] = rc->tot_scaled_length[i]; |
rc->avg_length[i] = rc->tot_scaled_length[i]; |
1278 |
|
|
1279 |
if (i == XVID_TYPE_IVOP) { |
if (i == (XVID_TYPE_IVOP-1)) { |
1280 |
/* I Frames total has to be added the boost total */ |
/* I Frames total has to be added the boost total */ |
1281 |
rc->avg_length[i] += ivop_boost_total; |
rc->avg_length[i] += ivop_boost_total; |
1282 |
} else { |
} else { |