Skip to content

Commit

Permalink
Fix "--duration" not working well with still images
Browse files Browse the repository at this point in the history
  • Loading branch information
Delgan authored and hpjansson committed May 28, 2023
1 parent 49a0bde commit 5c741fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/chafa/chafa.c
Expand Up @@ -150,7 +150,7 @@ sigint_handler (G_GNUC_UNUSED int sig)
#endif

static void
interruptible_usleep (gint us)
interruptible_usleep (gdouble us)
{
while (us > 0 && !interrupted_by_user)
{
Expand Down Expand Up @@ -2088,7 +2088,7 @@ run_generic (const gchar *filename, gboolean is_first_file, gboolean is_first_fr
remain_ms = MAX (remain_ms - elapsed_ms, 0);

if (remain_ms > 0.0001 && 1000.0 / (gdouble) remain_ms < ANIM_FPS_MAX)
interruptible_usleep (remain_ms * 1000);
interruptible_usleep (remain_ms * 1000.0);

anim_elapsed_s += MAX (elapsed_ms, delay_ms) / 1000.0;
}
Expand Down

0 comments on commit 5c741fe

Please sign in to comment.