Skip to content

Commit 37604d1

Browse files
committed
gpujpegtool: don't print save dur. if dec fails
This is symmetric to the commit a528b3b (2025-03-05) that implemented it just for encode.
1 parent 2c15a9f commit 37604d1

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/main.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -784,10 +784,11 @@ main(int argc, char *argv[])
784784
fprintf(stderr, "Failed to save image [%s]!\n", output);
785785
ret = EXIT_FAILURE;
786786
}
787-
788-
duration = gpujpeg_get_time() - duration;
789-
printf("Save Image: %10.2f ms\n", duration * 1000.0);
790-
printf("Image Name: %10s\n", output);
787+
else {
788+
duration = gpujpeg_get_time() - duration;
789+
printf("Save Image: %10.2f ms\n", duration * 1000.0);
790+
printf("Image Name: %10s\n", output);
791+
}
791792

792793
if ( use_opengl ) {
793794
free(data);

0 commit comments

Comments
 (0)