From 3625e88ab70f5550609b6622223fed691f513a88 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Fri, 9 Aug 2002 10:43:02 +0000 Subject: [PATCH] * resync without endless loop Originally committed as revision 849 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/mpegaudiodec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c index 1dabdac..93bd147 100644 --- a/libavcodec/mpegaudiodec.c +++ b/libavcodec/mpegaudiodec.c @@ -2397,8 +2397,10 @@ static int decode_frame(AVCodecContext * avctx, 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; -- 2.7.4