# HG changeset patch # User kabi # Date 1028889782 0 # Node ID d8d23aae4ac3cd861b29b6551a04895aa661583c # Parent 76e9b51cccda7b3e70b80750c09d7eed69bdc620 * resync without endless loop diff -r 76e9b51cccda -r d8d23aae4ac3 mpegaudiodec.c --- a/mpegaudiodec.c Fri Aug 09 00:13:54 2002 +0000 +++ b/mpegaudiodec.c Fri Aug 09 10:43:02 2002 +0000 @@ -2397,8 +2397,10 @@ if (len > buf_size) len = buf_size; if (len == 0) { - /* frame too long: resync */ + /* frame too long: resync */ s->frame_size = 0; + memcpy(s->inbuf, s->inbuf + 1, s->inbuf_ptr - s->inbuf - 1); + s->inbuf_ptr--; } else { UINT8 *p, *pend; UINT32 header1;