diff options
author | Anton Khirnov <anton@khirnov.net> | 2011-02-28 16:57:54 +0300 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2011-03-01 20:12:33 +0300 |
commit | 6b4aa5dac8f41aa452d0ce9a1bede9e59a303060 (patch) | |
tree | a2790d8f7304a735dc8edf52207b823ceb73a7da /libavformat/mpegts.c | |
parent | 76d8846c4e918749b045ea2ee7399a069af5e4a5 (diff) |
avio: avio_ prefix for url_fseek
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Diffstat (limited to 'libavformat/mpegts.c')
-rw-r--r-- | libavformat/mpegts.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 3307685b41..6a1b77301b 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -1316,7 +1316,7 @@ static int mpegts_resync(AVFormatContext *s) if (c < 0) return -1; if (c == 0x47) { - url_fseek(pb, -1, SEEK_CUR); + avio_seek(pb, -1, SEEK_CUR); return 0; } } @@ -1338,7 +1338,7 @@ static int read_packet(AVFormatContext *s, uint8_t *buf, int raw_packet_size) /* check paquet sync byte */ if (buf[0] != 0x47) { /* find a new packet start */ - url_fseek(pb, -TS_PACKET_SIZE, SEEK_CUR); + avio_seek(pb, -TS_PACKET_SIZE, SEEK_CUR); if (mpegts_resync(s) < 0) return AVERROR(EAGAIN); else @@ -1468,7 +1468,7 @@ static int mpegts_read_header(AVFormatContext *s, /* normal demux */ /* first do a scaning to get all the services */ - if (url_fseek(pb, pos, SEEK_SET) < 0) + if (avio_seek(pb, pos, SEEK_SET) < 0) av_log(s, AV_LOG_ERROR, "Unable to seek back to the start\n"); mpegts_open_section_filter(ts, SDT_PID, sdt_cb, ts, 1); @@ -1533,7 +1533,7 @@ static int mpegts_read_header(AVFormatContext *s, #endif } - url_fseek(pb, pos, SEEK_SET); + avio_seek(pb, pos, SEEK_SET); return 0; fail: return -1; @@ -1564,7 +1564,7 @@ static int mpegts_raw_read_packet(AVFormatContext *s, /* we read the next PCR (XXX: optimize it by using a bigger buffer */ pos = url_ftell(s->pb); for(i = 0; i < MAX_PACKET_READAHEAD; i++) { - url_fseek(s->pb, pos + i * ts->raw_packet_size, SEEK_SET); + avio_seek(s->pb, pos + i * ts->raw_packet_size, SEEK_SET); avio_read(s->pb, pcr_buf, 12); if (parse_pcr(&next_pcr_h, &next_pcr_l, pcr_buf) == 0) { /* XXX: not precise enough */ @@ -1573,7 +1573,7 @@ static int mpegts_raw_read_packet(AVFormatContext *s, break; } } - url_fseek(s->pb, pos, SEEK_SET); + avio_seek(s->pb, pos, SEEK_SET); /* no next PCR found: we use previous increment */ ts->cur_pcr = pcr_h * 300 + pcr_l; } @@ -1649,7 +1649,7 @@ static int64_t mpegts_get_pcr(AVFormatContext *s, int stream_index, pos = ((*ppos + ts->raw_packet_size - 1 - ts->pos47) / ts->raw_packet_size) * ts->raw_packet_size + ts->pos47; if (find_next) { for(;;) { - url_fseek(s->pb, pos, SEEK_SET); + avio_seek(s->pb, pos, SEEK_SET); if (avio_read(s->pb, buf, TS_PACKET_SIZE) != TS_PACKET_SIZE) return AV_NOPTS_VALUE; if ((pcr_pid < 0 || (AV_RB16(buf + 1) & 0x1fff) == pcr_pid) && @@ -1663,7 +1663,7 @@ static int64_t mpegts_get_pcr(AVFormatContext *s, int stream_index, pos -= ts->raw_packet_size; if (pos < 0) return AV_NOPTS_VALUE; - url_fseek(s->pb, pos, SEEK_SET); + avio_seek(s->pb, pos, SEEK_SET); if (avio_read(s->pb, buf, TS_PACKET_SIZE) != TS_PACKET_SIZE) return AV_NOPTS_VALUE; if ((pcr_pid < 0 || (AV_RB16(buf + 1) & 0x1fff) == pcr_pid) && @@ -1774,14 +1774,14 @@ static int read_seek(AVFormatContext *s, int stream_index, int64_t target_ts, in pos= url_ftell(s->pb); for(;;) { - url_fseek(s->pb, pos, SEEK_SET); + avio_seek(s->pb, pos, SEEK_SET); if (avio_read(s->pb, buf, TS_PACKET_SIZE) != TS_PACKET_SIZE) return -1; // pid = AV_RB16(buf + 1) & 0x1fff; if(buf[1] & 0x40) break; pos += ts->raw_packet_size; } - url_fseek(s->pb, pos, SEEK_SET); + avio_seek(s->pb, pos, SEEK_SET); return 0; } |