From c5371f775ca13cee114eea2d17e59af5a436a125 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 19 May 2012 22:22:45 +0200 Subject: [PATCH] mpegaudidec: 10l forgot buf_size Signed-off-by: Michael Niedermayer --- libavcodec/mpegaudiodec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c index 8635d4781a..64cbba8e44 100644 --- a/libavcodec/mpegaudiodec.c +++ b/libavcodec/mpegaudiodec.c @@ -1637,8 +1637,10 @@ static int decode_frame(AVCodecContext * avctx, void *data, int *got_frame_ptr, uint32_t header; int out_size; - while(buf_size && !*buf) + while(buf_size && !*buf){ buf++; + buf_size--; + } if (buf_size < HEADER_SIZE) return AVERROR_INVALIDDATA;