aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mpegaudiodec.c
diff options
context:
space:
mode:
authorZdenek Kabelac <kabi@informatics.muni.cz>2002-08-09 10:43:02 +0000
committerZdenek Kabelac <kabi@informatics.muni.cz>2002-08-09 10:43:02 +0000
commit3625e88ab70f5550609b6622223fed691f513a88 (patch)
tree7ba7e15578c4ab7764da8f76391557fee6cc1377 /libavcodec/mpegaudiodec.c
parent62959862df650f7b2e68c4ebf91864681cf3e01a (diff)
downloadffmpeg-3625e88ab70f5550609b6622223fed691f513a88.tar.gz
* resync without endless loop
Originally committed as revision 849 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegaudiodec.c')
-rw-r--r--libavcodec/mpegaudiodec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c
index 1dabdac255..93bd147ff3 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;