Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-05-19 21:54:03 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2017-05-19 22:14:26 +0300
commit0cc6dd1b817bc4510714dd99122625d93909290a (patch)
tree52ca4d71dcfd7c3fd1cc7dd009ed8596fe24a52b /libavformat/id3v2.c
parent7383a835e47cd8915ff9cdd693e06716dbae3b3a (diff)
avformat/id3v2: Use ffio_ensure_seekback() in id3v2_read_internal()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/id3v2.c')
-rw-r--r--libavformat/id3v2.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c
index f7fa3ef856..05346350ad 100644
--- a/libavformat/id3v2.c
+++ b/libavformat/id3v2.c
@@ -1072,7 +1072,9 @@ static void id3v2_read_internal(AVIOContext *pb, AVDictionary **metadata,
break;
}
- ret = avio_read(pb, buf, ID3v2_HEADER_SIZE);
+ ret = ffio_ensure_seekback(pb, ID3v2_HEADER_SIZE);
+ if (ret >= 0)
+ ret = avio_read(pb, buf, ID3v2_HEADER_SIZE);
if (ret != ID3v2_HEADER_SIZE) {
avio_seek(pb, off, SEEK_SET);
break;