fix bugs
This commit is contained in:
parent
0e9a905f85
commit
bc768006b4
18
avs2bdnxml.c
18
avs2bdnxml.c
@ -847,7 +847,6 @@ int main (int argc, char *argv[])
|
||||
int auto_cut = 0;
|
||||
int pal_png = 1;
|
||||
int ugly = 0;
|
||||
int progress_step = 1000;
|
||||
int buffer_opt;
|
||||
int bench_start = time(NULL);
|
||||
int fps_num = 25, fps_den = 1;
|
||||
@ -1127,6 +1126,9 @@ int main (int argc, char *argv[])
|
||||
|
||||
while (fscanf(ranges_fp, "%s %s", range_start_str, range_end_str) != EOF)
|
||||
{
|
||||
|
||||
have_line = 0;
|
||||
|
||||
init_frame = parse_int(range_start_str, "range_start", NULL);
|
||||
last_frame = parse_int(range_end_str, "range_end", NULL);
|
||||
|
||||
@ -1145,17 +1147,6 @@ int main (int argc, char *argv[])
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Set progress step */
|
||||
if (count_frames < 1000)
|
||||
{
|
||||
if (count_frames > 200)
|
||||
progress_step = 50;
|
||||
else if (count_frames > 50)
|
||||
progress_step = 10;
|
||||
else
|
||||
progress_step = 1;
|
||||
}
|
||||
|
||||
/* Process frames */
|
||||
for (i = init_frame; i <= last_frame; i++)
|
||||
{
|
||||
@ -1167,10 +1158,7 @@ int main (int argc, char *argv[])
|
||||
checked_empty = 0;
|
||||
|
||||
/* Progress indicator */
|
||||
if (i % (count_frames / progress_step) == 0)
|
||||
{
|
||||
fprintf(stderr, "\rProgress: %d/%d - Lines: %d", i - init_frame + before_range_frame_count, range_frame_count, num_of_events);
|
||||
}
|
||||
|
||||
/* If we are outside any lines, check for empty frames first */
|
||||
if (!have_line)
|
||||
|
Loading…
Reference in New Issue
Block a user