This patch depends on commit e9a8dcf780f1cbb6a6faf63b7ba28591963c1cbd
(flac: fix invalid memory access w/ optimize_trim) in the "dot" branch.
This patch is also available from my git repo:
git pull git://bogomips.org/sox dot-flac-eof-md5
There's no need to keep track of EOF state ourselves as the FLAC
decoder already keeps track of decoder state us. Instead, we
only need to keep track of whether or not we've seeked for MD5
To test the ability of the flac handler to detect bad MD5s,
I changed the MD5 checksum of a good FLAC file using the
undocumented "--set-md5sum" option of metaflac(1):
metaflac --set-md5sum d41d8cd98f00b204e9800998ecf8427e foo.flac
This let me decode the entire file without errors, but
ultimately fail the MD5 check.
Log in to post a comment.