mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-27 22:28:22 +01:00
Make dwebp listen more to the -quiet flag
it was still printing "Saved file ...". Change-Id: Ie450535d9d54b4ac213e486ab7f3c50761fefe2a
This commit is contained in:
parent
b37b0179c5
commit
f240117bef
@ -44,6 +44,7 @@
|
|||||||
#include "./stopwatch.h"
|
#include "./stopwatch.h"
|
||||||
|
|
||||||
static int verbose = 0;
|
static int verbose = 0;
|
||||||
|
static int quiet = 0;
|
||||||
#ifndef WEBP_DLL
|
#ifndef WEBP_DLL
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -509,10 +510,12 @@ static int SaveOutput(const WebPDecBuffer* const buffer,
|
|||||||
fclose(fout);
|
fclose(fout);
|
||||||
}
|
}
|
||||||
if (ok) {
|
if (ok) {
|
||||||
if (use_stdout) {
|
if (!quiet) {
|
||||||
fprintf(stderr, "Saved to stdout\n");
|
if (use_stdout) {
|
||||||
} else {
|
fprintf(stderr, "Saved to stdout\n");
|
||||||
fprintf(stderr, "Saved file %s\n", out_file);
|
} else {
|
||||||
|
fprintf(stderr, "Saved file %s\n", out_file);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (verbose) {
|
if (verbose) {
|
||||||
const double write_time = StopwatchReadAndReset(&stop_watch);
|
const double write_time = StopwatchReadAndReset(&stop_watch);
|
||||||
@ -570,7 +573,6 @@ int main(int argc, const char *argv[]) {
|
|||||||
int ok = 0;
|
int ok = 0;
|
||||||
const char *in_file = NULL;
|
const char *in_file = NULL;
|
||||||
const char *out_file = NULL;
|
const char *out_file = NULL;
|
||||||
int quiet = 0;
|
|
||||||
|
|
||||||
WebPDecoderConfig config;
|
WebPDecoderConfig config;
|
||||||
WebPDecBuffer* const output_buffer = &config.output;
|
WebPDecBuffer* const output_buffer = &config.output;
|
||||||
|
Loading…
Reference in New Issue
Block a user