Browse Source

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>
tags/n0.8
Carl Eugen Hoyos Ronald S. Bultje 15 years ago
parent
commit
13eadbaca4
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libavformat/id3v1.c

+ 2
- 1
libavformat/id3v1.c View File

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

Loading…
Cancel
Save