From 45a8a02a4151c9ff0d1161bf90bffcfbbb312fb8 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Tue, 15 Mar 2011 09:14:38 +0100 Subject: lavf: replace avio_seek(SEEK_CUR) with avio_skip where it makes sense Signed-off-by: Ronald S. Bultje --- libavformat/wav.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'libavformat/wav.c') 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; -- cgit v1.2.3