diff options
author | Martijn van Beurden <mvanb1@gmail.com> | 2022-09-16 20:49:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-16 20:49:27 +0200 |
commit | 526b28a95e0e7974904f14efde5b1c7351ea21c3 (patch) | |
tree | 096621e3a070961eb8c3d4982249e2016c8d8d05 /src | |
parent | 1cb364d8cfdf1abadac03c900ddd30de0291426d (diff) | |
download | flac-526b28a95e0e7974904f14efde5b1c7351ea21c3.tar.gz |
Warn user when encoding to stdout that checksum isn't written (#445)
Fixes https://github.com/xiph/flac/issues/428
Diffstat (limited to 'src')
-rw-r--r-- | src/flac/encode.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/flac/encode.c b/src/flac/encode.c index b82ced76..2b5fa236 100644 --- a/src/flac/encode.c +++ b/src/flac/encode.c @@ -2154,6 +2154,13 @@ FLAC__bool EncoderSession_init_encoder(EncoderSession *e, encode_options_t optio } FLAC__stream_encoder_set_do_md5(e->encoder, false); } + else if(e->is_stdout) { + flac__utils_printf(stderr, 1, "%s: WARNING, cannot write back MD5 sum when encoding to stdout\n", e->inbasefilename); + if(e->treat_warnings_as_errors) { + static_metadata_clear(&static_metadata); + return false; + } + } #if FLAC__HAS_OGG if(e->use_ogg) { |