OSDN Git Service
(root)
/
coroid
/
ffmpeg_saccubus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8993b59
)
Seek back to old position after reading id3v1 tag.
author
Carl Eugen Hoyos
<cehoyos@ag.or.at>
Mon, 7 Mar 2011 09:24:37 +0000
(10:24 +0100)
committer
Carl Eugen Hoyos
<cehoyos@ag.or.at>
Mon, 7 Mar 2011 22:32:26 +0000
(23:32 +0100)
FFmpeg did not seek back to the original position, but to "0", making
reading a VBR tag impossible.
(issue 2645)
libavformat/id3v1.c
patch
|
blob
|
history
diff --git
a/libavformat/id3v1.c
b/libavformat/id3v1.c
index
e17e785
..
9bd10ca
100644
(file)
--- 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);
}
}
}