diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-05-27 16:18:31 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-05-27 17:06:24 +0200 |
commit | f722009ad99733e619273372ade56c4c1b9c3b02 (patch) | |
tree | b9296cca76eb0a979617b0c5f5b175accfe5fe2a | |
parent | 2b3e9bbfb529e6bde238aeb511b55ebe461664c8 (diff) | |
download | ffmpeg-f722009ad99733e619273372ade56c4c1b9c3b02.tar.gz |
avformat/mp3dec: Ensure the buffer is large enough to avoid seeks from the first frame search
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/mp3dec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c index a5374a1037..07d7f54345 100644 --- a/libavformat/mp3dec.c +++ b/libavformat/mp3dec.c @@ -374,6 +374,8 @@ static int mp3_read_header(AVFormatContext *s) off = avio_tell(s->pb); for (i = 0; i < 64 * 1024; i++) { + if (!(i&1023)) + ffio_ensure_seekback(s->pb, i + 1024 + 4); if (check(s, off + i) >= 0) { av_log(s, AV_LOG_INFO, "Skipping %d bytes of junk at %lld.\n", i, (long long)off); avio_seek(s->pb, off + i, SEEK_SET); |