summaryrefslogtreecommitdiff
path: root/libavformat/id3v1.c
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2011-03-25 19:46:27 +0100
committerRonald S. Bultje <rsbultje@gmail.com>2011-03-28 21:15:50 -0700
commit13eadbaca4768a2b49b8403178c818bf8d75e0af (patch)
tree7e54a6c7a67932400932004fe8951e09c5eb5d41 /libavformat/id3v1.c
parentc4549bd66a94bec1284dcca0da19e5038a82cbe3 (diff)
id3v1: Seek back to old position after reading.
FFmpeg did not seek back to the original position, but to "0", making reading a VBR tag impossible. (issue 2645) Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
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 e0a2f43205..23cacf78c5 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 = avio_tell(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);
}
}
}