aboutsummaryrefslogtreecommitdiff
path: root/libavformat/rmdec.c
diff options
context:
space:
mode:
authorAnton Khirnov2011-02-28 14:57:55 +0100
committerRonald S. Bultje2011-03-01 12:22:16 -0500
commite356fc57a2e9887370caec58d8aafeafd1f336dc (patch)
treef500dfcba3ee9a3b24462d3fa33df8e654695814 /libavformat/rmdec.c
parent6b4aa5dac8f41aa452d0ce9a1bede9e59a303060 (diff)
lavf: replace all uses of url_fskip with avio_seek
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Diffstat (limited to 'libavformat/rmdec.c')
-rw-r--r--libavformat/rmdec.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
index 4d7c763db4..23f207595d 100644
--- a/libavformat/rmdec.c
+++ b/libavformat/rmdec.c
@@ -132,7 +132,7 @@ static int rm_read_audio_stream_info(AVFormatContext *s, AVIOContext *pb,
if (version == 3) {
int header_size = avio_rb16(pb);
int64_t startpos = url_ftell(pb);
- url_fskip(pb, 14);
+ avio_seek(pb, 14, SEEK_CUR);
rm_read_metadata(s, 0);
if ((startpos + header_size) >= url_ftell(pb) + 2) {
// fourcc (should always be "lpcJ")
@@ -141,7 +141,7 @@ static int rm_read_audio_stream_info(AVFormatContext *s, AVIOContext *pb,
}
// Skip extra header crap (this should never happen)
if ((startpos + header_size) > url_ftell(pb))
- url_fskip(pb, header_size + startpos - url_ftell(pb));
+ avio_seek(pb, header_size + startpos - url_ftell(pb), SEEK_CUR);
st->codec->sample_rate = 8000;
st->codec->channels = 1;
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
@@ -150,7 +150,7 @@ static int rm_read_audio_stream_info(AVFormatContext *s, AVIOContext *pb,
int flavor, sub_packet_h, coded_framesize, sub_packet_size;
int codecdata_length;
/* old version (4) */
- url_fskip(pb, 2); /* unused */
+ avio_seek(pb, 2, SEEK_CUR); /* unused */
avio_rb32(pb); /* .ra4 */
avio_rb32(pb); /* data size */
avio_rb16(pb); /* version2 */
@@ -321,7 +321,7 @@ ff_rm_read_mdpr_codecdata (AVFormatContext *s, AVIOContext *pb,
skip:
/* skip codec info */
size = url_ftell(pb) - codec_pos;
- url_fskip(pb, codec_data_size - size);
+ avio_seek(pb, codec_data_size - size, SEEK_CUR);
return 0;
}
@@ -340,7 +340,7 @@ static int rm_read_index(AVFormatContext *s)
size = avio_rb32(pb);
if (size < 20)
return -1;
- url_fskip(pb, 2);
+ avio_seek(pb, 2, SEEK_CUR);
n_pkts = avio_rb32(pb);
str_id = avio_rb16(pb);
next_off = avio_rb32(pb);
@@ -353,10 +353,10 @@ static int rm_read_index(AVFormatContext *s)
goto skip;
for (n = 0; n < n_pkts; n++) {
- url_fskip(pb, 2);
+ avio_seek(pb, 2, SEEK_CUR);
pts = avio_rb32(pb);
pos = avio_rb32(pb);
- url_fskip(pb, 4); /* packet no. */
+ avio_seek(pb, 4, SEEK_CUR); /* packet no. */
av_add_index_entry(st, pos, pts, 0, 0, AVINDEX_KEYFRAME);
}
@@ -469,7 +469,7 @@ static int rm_read_header(AVFormatContext *s, AVFormatParameters *ap)
goto header_end;
default:
/* unknown tag: skip it */
- url_fskip(pb, tag_size - 10);
+ avio_seek(pb, tag_size - 10, SEEK_CUR);
break;
}
}
@@ -529,7 +529,7 @@ static int sync(AVFormatContext *s, int64_t *timestamp, int *flags, int *stream_
if(state == MKBETAG('I', 'N', 'D', 'X')){
int n_pkts, expected_len;
len = avio_rb32(pb);
- url_fskip(pb, 2);
+ avio_seek(pb, 2, SEEK_CUR);
n_pkts = avio_rb32(pb);
expected_len = 20 + n_pkts * 14;
if (len == 20)
@@ -566,7 +566,7 @@ static int sync(AVFormatContext *s, int64_t *timestamp, int *flags, int *stream_
if (i == s->nb_streams) {
skip:
/* skip packet if unknown number */
- url_fskip(pb, len);
+ avio_seek(pb, len, SEEK_CUR);
rm->remaining_len = 0;
continue;
}
@@ -929,7 +929,7 @@ static int64_t rm_read_dts(AVFormatContext *s, int stream_index,
break;
}
- url_fskip(s->pb, len);
+ avio_seek(s->pb, len, SEEK_CUR);
}
*ppos = pos;
return dts;