summaryrefslogtreecommitdiff
path: root/libavformat/wav.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/wav.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/wav.c')
-rw-r--r--libavformat/wav.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavformat/wav.c b/libavformat/wav.c
index d51c01208e..d96b379b2c 100644
--- a/libavformat/wav.c
+++ b/libavformat/wav.c
@@ -160,7 +160,7 @@ static int64_t find_tag(AVIOContext *pb, uint32_t tag1)
size = next_tag(pb, &tag);
if (tag == tag1)
break;
- avio_seek(pb, size, SEEK_CUR);
+ avio_skip(pb, size);
}
return size;
}
@@ -217,7 +217,7 @@ static int wav_read_header(AVFormatContext *s,
avio_rl64(pb); /* RIFF size */
data_size = avio_rl64(pb);
sample_count = avio_rl64(pb);
- avio_seek(pb, size - 16, SEEK_CUR); /* skip rest of ds64 chunk */
+ avio_skip(pb, size - 16); /* skip rest of ds64 chunk */
}
/* parse fmt header */
@@ -243,7 +243,7 @@ static int wav_read_header(AVFormatContext *s,
sample_count = avio_rl32(pb);
size -= 4;
}
- avio_seek(pb, size, SEEK_CUR);
+ avio_skip(pb, size);
}
if (rf64)
size = data_size;
@@ -276,7 +276,7 @@ static int64_t find_guid(AVIOContext *pb, const uint8_t guid1[16])
return -1;
if (!memcmp(guid, guid1, 16))
return size;
- avio_seek(pb, FFALIGN(size, INT64_C(8)) - 24, SEEK_CUR);
+ avio_skip(pb, FFALIGN(size, INT64_C(8)) - 24);
}
return -1;
}
@@ -410,7 +410,7 @@ static int w64_read_header(AVFormatContext *s, AVFormatParameters *ap)
/* subtract chunk header size - normal wav file doesn't count it */
ff_get_wav_header(pb, st->codec, size - 24);
- avio_seek(pb, FFALIGN(size, INT64_C(8)) - size, SEEK_CUR);
+ avio_skip(pb, FFALIGN(size, INT64_C(8)) - size);
st->need_parsing = AVSTREAM_PARSE_FULL;