avformat/id3v2: Use ffio_ensure_seekback() in id3v2_read_internal()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2017-05-19 20:54:03 +02:00
parent 7383a835e4
commit 0cc6dd1b81
1 changed files with 3 additions and 1 deletions

View File

@ -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;