Commit 0cc6dd1b authored by Michael Niedermayer's avatar Michael Niedermayer

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

Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 7383a835
...@@ -1072,7 +1072,9 @@ static void id3v2_read_internal(AVIOContext *pb, AVDictionary **metadata, ...@@ -1072,7 +1072,9 @@ static void id3v2_read_internal(AVIOContext *pb, AVDictionary **metadata,
break; 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) { if (ret != ID3v2_HEADER_SIZE) {
avio_seek(pb, off, SEEK_SET); avio_seek(pb, off, SEEK_SET);
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment