Re: MAD_ERROR_BADHUFFDATA before MAD_ERROR_BUFLEN
Rob Leslie <[email protected]> Sun, 20 May 2007 18:04:46 -0700
| Newsgroups | gmane.comp.audio.mad.devel |
|---|---|
| Message-ID | <[email protected]> |
On Apr 29, 2007, at 11:01 AM, Radek Barto=C5=88 wrote: > I tried to incorporate Madlld low-level API demonstration code into =20 > my MP3 player, but I'm experiencing a weird problem. When data =20 > stored by mad_stream_buffer to MAD are going to run out =20 > MAD_ERROR_BADHUFFDATA is generated right before MAD_ERROR_BUFLEN. =20 > Then when new data are sent to MAD MAD_ERROR_BADCRC and =20 > MAD_ERROR_BADDATAPTR occur. Since then no other errors occur until =20 > next data are consumed. This produces slight skip in otherwise =20 > fluent playback. I checked twice that my code which I'm attaching =20 > is equivalent to Madlld's one. Please, if you'll notice a reasong =20 > of this behaviour in my code, let me know since I'm little =20 > desperate about this. You should not inspect this->int_stream.error (at line 35) unless =20 mad_decode_frame() returns -1, because this field is not otherwise =20 reset. I suspect you may be loading new data each time through the =20 loop, until another decoding error occurs as a consequence. --=20 Rob Leslie [email protected]