I have a WAVE file that I recently encoded with the --keep-foreign-metadata flag set. Immediately I got this error:
"<song>.wav: ERROR reading foreign metadata: invalid WAVE file: unexpected EOF (010)"
So then I went to encode the file normally with flac, and I got this warning at the end of encoding:
"<song>.wav: WARNING: skipping unknown sub-chunk 'id3 ' (use --keep-foreign-metadata to keep)"
The WAVE file is a dance mix that a friend of mine made a few years ago (using Adobe premier I think... yeah it's odd) and I am just guessing here, but I think maybe he somehow added an ID3 tag to a WAVE file, and that might be causing the error.
The important info:
flac.exe --version: 1.2.1
(from the Windows Installer obtained from the project sorceforge page)
Windows 2000 SP4 (up to date)
Intel Pentium 4 2.4GHz (Northwood)
The WAVE file was available via a SaMBa share, and I was saving the encoded file locally.