summaryrefslogtreecommitdiff
path: root/libavformat/id3v2.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2011-03-15 09:14:38 +0100
committerRonald S. Bultje <rsbultje@gmail.com>2011-03-16 22:24:51 -0400
commit45a8a02a4151c9ff0d1161bf90bffcfbbb312fb8 (patch)
tree79beacdc9d6d90d0e31558526d83033200f4361d /libavformat/id3v2.c
parentcbf5d22d24945e52b3c1e4c1a00d4d8179be930a (diff)
lavf: replace avio_seek(SEEK_CUR) with avio_skip where it makes sense
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Diffstat (limited to 'libavformat/id3v2.c')
-rw-r--r--libavformat/id3v2.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c
index be88d10caa..b288ec6eec 100644
--- a/libavformat/id3v2.c
+++ b/libavformat/id3v2.c
@@ -217,7 +217,7 @@ static void ff_id3v2_parse(AVFormatContext *s, int len, uint8_t version, uint8_t
unsync = flags & 0x80;
if (isv34 && flags & 0x40) /* Extended header present, just skip over it */
- avio_seek(s->pb, get_size(s->pb, 4), SEEK_CUR);
+ avio_skip(s->pb, get_size(s->pb, 4));
while (len >= taghdrlen) {
unsigned int tflags;
@@ -251,7 +251,7 @@ static void ff_id3v2_parse(AVFormatContext *s, int len, uint8_t version, uint8_t
if (tflags & (ID3v2_FLAG_ENCRYPTION | ID3v2_FLAG_COMPRESSION)) {
av_log(s, AV_LOG_WARNING, "Skipping encrypted/compressed ID3v2 frame %s.\n", tag);
- avio_seek(s->pb, tlen, SEEK_CUR);
+ avio_skip(s->pb, tlen);
} else if (tag[0] == 'T') {
if (unsync || tunsync) {
int i, j;
@@ -272,7 +272,7 @@ static void ff_id3v2_parse(AVFormatContext *s, int len, uint8_t version, uint8_t
else if (!tag[0]) {
if (tag[1])
av_log(s, AV_LOG_WARNING, "invalid frame id, assuming padding");
- avio_seek(s->pb, tlen, SEEK_CUR);
+ avio_skip(s->pb, tlen);
break;
}
/* Skip to end of tag */
@@ -281,10 +281,10 @@ static void ff_id3v2_parse(AVFormatContext *s, int len, uint8_t version, uint8_t
if (len > 0) {
/* Skip padding */
- avio_seek(s->pb, len, SEEK_CUR);
+ avio_skip(s->pb, len);
}
if (version == 4 && flags & 0x10) /* Footer preset, always 10 bytes, skip over it */
- avio_seek(s->pb, 10, SEEK_CUR);
+ avio_skip(s->pb, 10);
av_free(buffer);
return;