Unverified Commit 52d239bc authored by Wolle's avatar Wolle Committed by GitHub

(#227) better solution

parent e77e7502
......@@ -3879,8 +3879,7 @@ void Audio::printDecodeError(int r) {
}
sprintf(chbuf, "MP3 decode error %d : %s", r, e);
if(audio_info) audio_info(chbuf);
if(r == ERR_MP3_FREE_BITRATE_SYNC) MP3Decoder_ClearBuffer(); // avoid TG1WDT_SYS_RESET #227
}
}
if(m_codec == CODEC_AAC){
switch(r){
case ERR_AAC_NONE: e = strdup("NONE"); break;
......
......@@ -3,7 +3,7 @@
* libhelix_HMP3DECODER
*
* Created on: 26.10.2018
* Updated on: 10.04.2021
* Updated on: 12.11.2021
*/
#include "mp3_decoder.h"
......@@ -1351,6 +1351,7 @@ int MP3Decode( unsigned char *inbuf, int *bytesLeft, short *outbuf, int useSize)
m_MP3DecInfo->freeBitrateSlots=MP3FindFreeSync(inbuf, inbuf - fhBytes - siBytes, *bytesLeft);
if(m_MP3DecInfo->freeBitrateSlots < 0){
MP3ClearBadFrame(outbuf);
m_MP3DecInfo->freeBitrateFlag = 0;
return ERR_MP3_FREE_BITRATE_SYNC;
}
freeFrameBytes=m_MP3DecInfo->freeBitrateSlots + fhBytes + siBytes;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment