I accidentally loaded some non-audio data in my application, and I'm getting:
a.out: layer3.c:2640: mad_layer_III: Assertion `stream->md_len + md_len - si.main_data_begin <= (511 + 2048 + 8)' failed.
I'm using the low-level interface. I can reproduce this with madlld, if I change INPUT_BUFFER_SIZE from 5*8192 to 4*8192 or lower (my own buffer is 16k).
The file (edited down as small as I can get it while still triggering this) is at:
http://zewt.org/~glenn/testfile
There's some MPEG-1 video in there, which I suppose MAD is picking up; that's fine, I just want it to gracefully play garbage or give a fatal error, without dying.
On Sun, Oct 31, 2004 at 02:55:57PM -0500, Glenn Maynard wrote:
I accidentally loaded some non-audio data in my application, and I'm getting:
a.out: layer3.c:2640: mad_layer_III: Assertion `stream->md_len + md_len - si.main_data_begin <= (511 + 2048 + 8)' failed.
I'm using the low-level interface. I can reproduce this with madlld, if I change INPUT_BUFFER_SIZE from 5*8192 to 4*8192 or lower (my own buffer is 16k).
The file (edited down as small as I can get it while still triggering this) is at:
http://zewt.org/~glenn/testfile
There's some MPEG-1 video in there, which I suppose MAD is picking up; that's fine, I just want it to gracefully play garbage or give a fatal error, without dying.
Any tips on this? I like MAD for its robustness, so it's frustrating to have a known case where user data can crash my application.