mirror of
https://github.com/claunia/flac.git
synced 2025-12-16 18:54:26 +00:00
MD5 comparison failures on decoding are now an error instead of a warning and will also return a non-zero exit code (SF #1493725).
This commit is contained in:
@@ -88,6 +88,7 @@
|
|||||||
<li>Added a new option <a href="documentation.html#flac_options_tag_from_file"><span class="argument">--tag-from-file</span></a> for setting a tag from file (e.g. for importing a cuesheet as a tag).</li>
|
<li>Added a new option <a href="documentation.html#flac_options_tag_from_file"><span class="argument">--tag-from-file</span></a> for setting a tag from file (e.g. for importing a cuesheet as a tag).</li>
|
||||||
<li>Added support for encoding from non-compressed AIFF-C (<a href="https://sourceforge.net/tracker/?func=detail&atid=113478&aid=1090933&group_id=13478">SF #1090933</a>).</li>
|
<li>Added support for encoding from non-compressed AIFF-C (<a href="https://sourceforge.net/tracker/?func=detail&atid=113478&aid=1090933&group_id=13478">SF #1090933</a>).</li>
|
||||||
<li>Importing of non-CDDA-compliant cuesheets now only issues a warning, not an error (see <a href="http://www.hydrogenaudio.org/forums/index.php?showtopic=31282">here</a>).</li>
|
<li>Importing of non-CDDA-compliant cuesheets now only issues a warning, not an error (see <a href="http://www.hydrogenaudio.org/forums/index.php?showtopic=31282">here</a>).</li>
|
||||||
|
<li>MD5 comparison failures on decoding are now an error instead of a warning and will also return a non-zero exit code (<a href="https://sourceforge.net/tracker/index.php?func=detail&aid=1493725&group_id=13478&atid=113478">SF #1493725</a>).</li>
|
||||||
<li>Fixed a bug in cuesheet parsing where it would return an error if the last line of the cuesheet did not end with a newline.</li>
|
<li>Fixed a bug in cuesheet parsing where it would return an error if the last line of the cuesheet did not end with a newline.</li>
|
||||||
<li>Fixed a bug that caused a crash when <span class="argument">-a</span> and <span class="argument">-t</span> were used together (<a href="https://sourceforge.net/tracker/index.php?func=detail&aid=1229481&group_id=13478&atid=113478">SF #1229481</a>).</li>
|
<li>Fixed a bug that caused a crash when <span class="argument">-a</span> and <span class="argument">-t</span> were used together (<a href="https://sourceforge.net/tracker/index.php?func=detail&aid=1229481&group_id=13478&atid=113478">SF #1229481</a>).</li>
|
||||||
<li>Fixed a bug with --sector-align where appended samples were not always totally silent (<a href="https://sourceforge.net/tracker/index.php?func=detail&aid=1237707&group_id=13478&atid=113478">SF #1237707</a>).</li>
|
<li>Fixed a bug with --sector-align where appended samples were not always totally silent (<a href="https://sourceforge.net/tracker/index.php?func=detail&aid=1237707&group_id=13478&atid=113478">SF #1237707</a>).</li>
|
||||||
|
|||||||
@@ -525,7 +525,7 @@ FLAC__bool DecoderSession_process(DecoderSession *d)
|
|||||||
|
|
||||||
int DecoderSession_finish_ok(DecoderSession *d)
|
int DecoderSession_finish_ok(DecoderSession *d)
|
||||||
{
|
{
|
||||||
FLAC__bool md5_failure = false;
|
FLAC__bool ok = true, md5_failure = false;
|
||||||
|
|
||||||
#ifdef FLAC__HAS_OGG
|
#ifdef FLAC__HAS_OGG
|
||||||
if(d->is_ogg) {
|
if(d->is_ogg) {
|
||||||
@@ -547,7 +547,8 @@ int DecoderSession_finish_ok(DecoderSession *d)
|
|||||||
if(d->analysis_mode)
|
if(d->analysis_mode)
|
||||||
flac__analyze_finish(d->aopts);
|
flac__analyze_finish(d->aopts);
|
||||||
if(md5_failure) {
|
if(md5_failure) {
|
||||||
flac__utils_printf(stderr, 1, "\r%s: WARNING, MD5 signature mismatch\n", d->inbasefilename);
|
flac__utils_printf(stderr, 1, "\r%s: ERROR, MD5 signature mismatch\n", d->inbasefilename);
|
||||||
|
ok = d->continue_through_decode_errors;
|
||||||
}
|
}
|
||||||
else if(!d->got_stream_info) {
|
else if(!d->got_stream_info) {
|
||||||
flac__utils_printf(stderr, 1, "\r%s: WARNING, cannot check MD5 signature since there was no STREAMINFO\n", d->inbasefilename);
|
flac__utils_printf(stderr, 1, "\r%s: WARNING, cannot check MD5 signature since there was no STREAMINFO\n", d->inbasefilename);
|
||||||
@@ -555,11 +556,11 @@ int DecoderSession_finish_ok(DecoderSession *d)
|
|||||||
else {
|
else {
|
||||||
flac__utils_printf(stderr, 2, "\r%s: %s \n", d->inbasefilename, d->test_only? "ok ":d->analysis_mode?"done ":"done");
|
flac__utils_printf(stderr, 2, "\r%s: %s \n", d->inbasefilename, d->test_only? "ok ":d->analysis_mode?"done ":"done");
|
||||||
}
|
}
|
||||||
DecoderSession_destroy(d, /*error_occurred=*/false);
|
DecoderSession_destroy(d, /*error_occurred=*/!ok);
|
||||||
if((d->is_wave_out || d->is_aiff_out) && (d->iff_headers_need_fixup || (!d->got_stream_info && strcmp(d->outfilename, "-"))))
|
if((d->is_wave_out || d->is_aiff_out) && (d->iff_headers_need_fixup || (!d->got_stream_info && strcmp(d->outfilename, "-"))))
|
||||||
if(!fixup_iff_headers(d))
|
if(!fixup_iff_headers(d))
|
||||||
return 1;
|
return 1;
|
||||||
return 0;
|
return ok? 0 : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int DecoderSession_finish_error(DecoderSession *d)
|
int DecoderSession_finish_error(DecoderSession *d)
|
||||||
|
|||||||
Reference in New Issue
Block a user