summaryrefslogtreecommitdiff
path: root/libavformat/tta.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/tta.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/tta.c')
-rw-r--r--libavformat/tta.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/tta.c b/libavformat/tta.c
index 8669057fbd..d5f8e1ed61 100644
--- a/libavformat/tta.c
+++ b/libavformat/tta.c
@@ -50,7 +50,7 @@ static int tta_read_header(AVFormatContext *s, AVFormatParameters *ap)
if (avio_rl32(s->pb) != AV_RL32("TTA1"))
return -1; // not tta file
- avio_seek(s->pb, 2, SEEK_CUR); // FIXME: flags
+ avio_skip(s->pb, 2); // FIXME: flags
channels = avio_rl16(s->pb);
bps = avio_rl16(s->pb);
samplerate = avio_rl32(s->pb);
@@ -65,7 +65,7 @@ static int tta_read_header(AVFormatContext *s, AVFormatParameters *ap)
return -1;
}
- avio_seek(s->pb, 4, SEEK_CUR); // header crc
+ avio_skip(s->pb, 4); // header crc
framelen = samplerate*256/245;
c->totalframes = datalen / framelen + ((datalen % framelen) ? 1 : 0);
@@ -91,7 +91,7 @@ static int tta_read_header(AVFormatContext *s, AVFormatParameters *ap)
av_add_index_entry(st, framepos, i*framelen, size, 0, AVINDEX_KEYFRAME);
framepos += size;
}
- avio_seek(s->pb, 4, SEEK_CUR); // seektable crc
+ avio_skip(s->pb, 4); // seektable crc
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
st->codec->codec_id = CODEC_ID_TTA;