aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mpegaudiodec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-05-19 22:15:21 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-05-19 22:15:21 +0200
commit43bc5cf9f457c3a7caabc3781a71dee8dd4086ee (patch)
tree5bd21415c721d03965da1da2ac4ddf7ae804d28a /libavcodec/mpegaudiodec.c
parent040a796dab2721abbbeceb3df8368e59254d6827 (diff)
downloadffmpeg-43bc5cf9f457c3a7caabc3781a71dee8dd4086ee.tar.gz
mpegaudiodec: skip initial zeros.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mpegaudiodec.c')
-rw-r--r--libavcodec/mpegaudiodec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c
index 6a2b0fdd53..8635d4781a 100644
--- a/libavcodec/mpegaudiodec.c
+++ b/libavcodec/mpegaudiodec.c
@@ -1637,6 +1637,9 @@ static int decode_frame(AVCodecContext * avctx, void *data, int *got_frame_ptr,
uint32_t header;
int out_size;
+ while(buf_size && !*buf)
+ buf++;
+
if (buf_size < HEADER_SIZE)
return AVERROR_INVALIDDATA;