We use some bogus 'mp3' files to test error handling in libraries we use and in our own code. Prior versions of mpg123 (1.7.0...) did not notice the problem, but returned 0 for the samplerate from mpg123_getformat(). Now, in version 1.9.0, error messages get logged to stderr, and mpg123_getformat() and mpg123_info() report the same, non-zero samplerate, but MPG123_OK is returned from all functions, and the information from mpg123_info() isn't self consistent.
Once an error has been noticed with a file-based handle, mpg123 should never return MPG123_OK from functions that are handed the bogus handle.
Here's the stderr messages:
Note: Illegal Audio-MPEG-Header 0x00060009 at offset 0xda3.
Note: Trying to resync...
Note: Skipped 129 bytes in input.
The file in question is too big to attach to this defect report. You can find it here: