summaryrefslogtreecommitdiff
path: root/libavformat/id3v1.c
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2011-03-07 10:24:37 +0100
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2011-03-07 23:32:26 +0100
commitf8fab7499666e4d157919b7190d916db9f94a665 (patch)
treedf67c1da59c4603daf8cae2e053800a3aca4d7c1 /libavformat/id3v1.c
parent8993b5969ad1106df28f1128ed2fb2a18ba39989 (diff)
Seek back to old position after reading id3v1 tag.
FFmpeg did not seek back to the original position, but to "0", making reading a VBR tag impossible. (issue 2645)
Diffstat (limited to 'libavformat/id3v1.c')
-rw-r--r--libavformat/id3v1.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/id3v1.c b/libavformat/id3v1.c
index e17e785ad5..9bd10ca9c0 100644
--- a/libavformat/id3v1.c
+++ b/libavformat/id3v1.c
@@ -227,6 +227,7 @@ void ff_id3v1_read(AVFormatContext *s)
{
int ret, filesize;
uint8_t buf[ID3v1_TAG_SIZE];
+ int64_t position = url_ftell(s->pb);
if (!url_is_streamed(s->pb)) {
/* XXX: change that */
@@ -237,7 +238,7 @@ void ff_id3v1_read(AVFormatContext *s)
if (ret == ID3v1_TAG_SIZE) {
parse_tag(s, buf);
}
- avio_seek(s->pb, 0, SEEK_SET);
+ avio_seek(s->pb, position, SEEK_SET);
}
}
}