diff options
author | Anton Khirnov <anton@khirnov.net> | 2011-03-15 09:14:38 +0100 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2011-03-16 22:24:51 -0400 |
commit | 45a8a02a4151c9ff0d1161bf90bffcfbbb312fb8 (patch) | |
tree | 79beacdc9d6d90d0e31558526d83033200f4361d /libavformat/rtpdec_asf.c | |
parent | cbf5d22d24945e52b3c1e4c1a00d4d8179be930a (diff) | |
download | ffmpeg-45a8a02a4151c9ff0d1161bf90bffcfbbb312fb8.tar.gz |
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/rtpdec_asf.c')
-rw-r--r-- | libavformat/rtpdec_asf.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavformat/rtpdec_asf.c b/libavformat/rtpdec_asf.c index 8c4969111c..3c19ad6e5b 100644 --- a/libavformat/rtpdec_asf.c +++ b/libavformat/rtpdec_asf.c @@ -187,11 +187,11 @@ static int asfrtp_parse_packet(AVFormatContext *s, PayloadContext *asf, flags |= RTP_FLAG_KEY; len_off = avio_rb24(pb); if (mflags & 0x20) /**< relative timestamp */ - avio_seek(pb, 4, SEEK_CUR); + avio_skip(pb, 4); if (mflags & 0x10) /**< has duration */ - avio_seek(pb, 4, SEEK_CUR); + avio_skip(pb, 4); if (mflags & 0x8) /**< has location ID */ - avio_seek(pb, 4, SEEK_CUR); + avio_skip(pb, 4); off = avio_tell(pb); if (!(mflags & 0x40)) { @@ -214,7 +214,7 @@ static int asfrtp_parse_packet(AVFormatContext *s, PayloadContext *asf, return AVERROR(EIO); avio_write(asf->pktbuf, buf + off, len - off); - avio_seek(pb, len - off, SEEK_CUR); + avio_skip(pb, len - off); if (!(flags & RTP_FLAG_MARKER)) return -1; out_len = url_close_dyn_buf(asf->pktbuf, &asf->buf); @@ -234,7 +234,7 @@ static int asfrtp_parse_packet(AVFormatContext *s, PayloadContext *asf, asf->buf = av_realloc(asf->buf, out_len); memcpy(asf->buf + prev_len, buf + off, FFMIN(cur_len, len - off)); - avio_seek(pb, cur_len, SEEK_CUR); + avio_skip(pb, cur_len); } } |