Skip to content

Commit ab39e5a

Browse files
authored
Fix to "auto-mode" sometimes getting stuck in a loop (#210)
1 parent 2766f8d commit ab39e5a

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

README

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
Jpegoptim v1.5.6 - Copyright (C) Timo Kokkonen, 1996-2025. All Rights Reserved.
2+
Jpegoptim v1.5.7beta - Copyright (C) Timo Kokkonen, 1996-2025. All Rights Reserved.
33

44

55
REQUIREMENTS
@@ -18,15 +18,16 @@ INSTALLATION
1818
tar file, make necessary changes to the Makefile, and then
1919
compile the program. You may wanna do something like this:
2020

21-
tar xzvf jpegoptim-1.5.6.tar.gz
22-
cd jpegoptim-1.5.6
21+
tar xzvf jpegoptim-1.5.7.tar.gz
22+
cd jpegoptim-1.5.7
2323
./configure
2424
make
2525
make strip
2626
make install
2727

2828

2929
HISTORY
30+
v1.5.7 - fix to --auto-mode sometimes getting stuck in a loop
3031
v1.5.6 - add new option -r, --retry,
3132
add new option --save-extra,
3233
add new option --auto-mode,
@@ -148,4 +149,4 @@ Special thanks for following Github Sponsors that have supported jpegoptim:
148149

149150

150151
151-
14-Sep-2025
152+
15-Nov-2025

jpegoptim.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
#include "jpegoptim.h"
6565

6666

67-
#define VERSION "1.5.6"
67+
#define VERSION "1.5.7beta"
6868
#define COPYRIGHT "Copyright (C) 1996-2025, Timo Kokkonen"
6969

7070
#if HAVE_WAIT && HAVE_FORK
@@ -1089,6 +1089,7 @@ int optimize(FILE *log_fh, const char *filename, const char *newname,
10891089
} else {
10901090
if (verbose_mode > 1)
10911091
fprintf(log_fh, "(automode done: %lu) ", outsize);
1092+
auto_mode = 0;
10921093
if (outsize > last_retry_size) {
10931094
if (verbose_mode)
10941095
fprintf(log_fh, "(revert to %s) ", (!newmode ? "progressive" : "normal"));

0 commit comments

Comments
 (0)