My QA guy and I have been running total garbage files through our 
application (.jpg and .exe files renamed to .mp3) and have been
getting inconsistent error reporting from lame.

Converting 04_Bogus.mp3 to WAV...
nice lame --decode source/04_Bogus.mp3 converting/track03.wav 2>&1
Error reading headers in mp3 input file source/04_Bogus.mp3.
Failed to convert 04_Bogus.mp3 to WAV.

In this first case, the garbage file is detected and lame exits
with a non-zero status.

Converting DivXInstaller.mp3 to WAV...
nice lame --decode source/DivXInstaller.mp3 converting/track02.wav 2>&1
Input file is freeformat.
 (44.1 kHz, 2 channels, MPEG-1 Layer III)
output: converting/track02.wav
 (16 bit, Microsoft WAVE)
skipping initial 1105 samples (encoder+decoder delay)
Error: sample frequency has changed in MP3 file - not supported
mpglib: wordpointer trashed.  size=2013 (1792)  bytes=53902
Error: sample frequency has changed in MP3 file - not supported
Error: sample frequency has changed in MP3 file - not supported

In this second case, the garbage file is mistakenly detected as
a "freeformat" mp3 and manages to stumble its way through the
process.  Despite logging errors, lame returns a success!

Does anyone know if it is possible to
1) abort decoding when an error is detected? or
2) disallow freeformat encoding

I recognize that it wouldn't be terribly difficult to parse the
log looking for errors, but it seems more logical to me to prefer
that lame return the expected status.

Adam

_______________________________________________
mp3encoder mailing list
mp3encoder@minnie.tuhs.org
https://minnie.tuhs.org/mailman/listinfo/mp3encoder

Reply via email to