summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libavformat/mp3dec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c
index a5374a1..07d7f54 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);
OpenPOWER on IntegriCloud