Commit 471fe57e authored by Anton Khirnov's avatar Anton Khirnov Committed by Michael Niedermayer

avio: rename ByteIOContext to AVIOContext.

Signed-off-by: default avatarRonald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit ae628ec1)
parent a8858ee1
......@@ -163,7 +163,7 @@ typedef struct HTTPContext {
/* RTSP state specific */
uint8_t *pb_buffer; /* XXX: use that in all the code */
ByteIOContext *pb;
AVIOContext *pb;
int seq; /* RTSP sequence number */
/* RTP state specific */
......@@ -1854,7 +1854,7 @@ static int http_parse_request(HTTPContext *c)
return 0;
}
static void fmt_bytecount(ByteIOContext *pb, int64_t count)
static void fmt_bytecount(AVIOContext *pb, int64_t count)
{
static const char *suffix = " kMGTP";
const char *s;
......@@ -1871,7 +1871,7 @@ static void compute_status(HTTPContext *c)
char *p;
time_t ti;
int i, len;
ByteIOContext *pb;
AVIOContext *pb;
if (url_open_dyn_buf(&pb) < 0) {
/* XXX: return an error ? */
......@@ -2491,7 +2491,7 @@ static int http_send_data(HTTPContext *c)
if (c->rtp_protocol == RTSP_LOWER_TRANSPORT_TCP) {
/* RTP packets are sent inside the RTSP TCP connection */
ByteIOContext *pb;
AVIOContext *pb;
int interleaved_index, size;
uint8_t header[4];
HTTPContext *rtsp_c;
......@@ -2712,7 +2712,7 @@ static int http_receive_data(HTTPContext *c)
} else {
/* We have a header in our hands that contains useful data */
AVFormatContext *s = NULL;
ByteIOContext *pb;
AVIOContext *pb;
AVInputFormat *fmt_in;
int i;
......
......@@ -92,7 +92,7 @@ static int fourxm_probe(AVProbeData *p)
static int fourxm_read_header(AVFormatContext *s,
AVFormatParameters *ap)
{
ByteIOContext *pb = s->pb;
AVIOContext *pb = s->pb;
unsigned int fourcc_tag;
unsigned int size;
int header_size;
......@@ -244,7 +244,7 @@ static int fourxm_read_packet(AVFormatContext *s,
AVPacket *pkt)
{
FourxmDemuxContext *fourxm = s->priv_data;
ByteIOContext *pb = s->pb;
AVIOContext *pb = s->pb;
unsigned int fourcc_tag;
unsigned int size, out_size;
int ret = 0;
......
......@@ -118,7 +118,7 @@ int ff_adts_write_frame_header(ADTSContext *ctx,
static int adts_write_packet(AVFormatContext *s, AVPacket *pkt)
{
ADTSContext *adts = s->priv_data;
ByteIOContext *pb = s->pb;
AVIOContext *pb = s->pb;
uint8_t buf[ADTS_HEADER_SIZE];
if (!pkt->size)
......
......@@ -47,7 +47,7 @@ static enum CodecID aiff_codec_get_id(int bps)
}
/* returns the size of the found tag */
static int get_tag(ByteIOContext *pb, uint32_t * tag)
static int get_tag(AVIOContext *pb, uint32_t * tag)
{
int size;
......@@ -83,7 +83,7 @@ static void get_meta(AVFormatContext *s, const char *key, int size)
}
/* Returns the number of sound data frames or negative on error */
static unsigned int get_aiff_header(ByteIOContext *pb, AVCodecContext *codec,
static unsigned int get_aiff_header(AVIOContext *pb, AVCodecContext *codec,
int size, unsigned version)
{
AVExtFloat ext;
......@@ -177,7 +177,7 @@ static int aiff_read_header(AVFormatContext *s,
int64_t offset = 0;
uint32_t tag;
unsigned version = AIFF_C_VERSION1;
ByteIOContext *pb = s->pb;
AVIOContext *pb = s->pb;
AVStream * st;
AIFFInputContext *aiff = s->priv_data;
......
......@@ -31,7 +31,7 @@ typedef struct {
static int aiff_write_header(AVFormatContext *s)
{
AIFFOutputContext *aiff = s->priv_data;
ByteIOContext *pb = s->pb;
AVIOContext *pb = s->pb;
AVCodecContext *enc = s->streams[0]->codec;
AVExtFloat sample_rate;
int aifc = 0;
......@@ -104,14 +104,14 @@ static int aiff_write_header(AVFormatContext *s)
static int aiff_write_packet(AVFormatContext *s, AVPacket *pkt)
{
ByteIOContext *pb = s->pb;
AVIOContext *pb = s->pb;
put_buffer(pb, pkt->data, pkt->size);
return 0;
}
static int aiff_write_trailer(AVFormatContext *s)
{
ByteIOContext *pb = s->pb;
AVIOContext *pb = s->pb;
AIFFOutputContext *aiff = s->priv_data;
AVCodecContext *enc = s->streams[0]->codec;
......
......@@ -33,7 +33,7 @@ static const char AMRWB_header [] = "#!AMR-WB\n";
#if CONFIG_AMR_MUXER
static int amr_write_header(AVFormatContext *s)
{
ByteIOContext *pb = s->pb;
AVIOContext *pb = s->pb;
AVCodecContext *enc = s->streams[0]->codec;
s->priv_data = NULL;
......@@ -78,7 +78,7 @@ static int amr_probe(AVProbeData *p)
static int amr_read_header(AVFormatContext *s,
AVFormatParameters *ap)
{
ByteIOContext *pb = s->pb;
AVIOContext *pb = s->pb;
AVStream *st;
uint8_t header[9];
......
......@@ -79,7 +79,7 @@ static int read_header(AVFormatContext *s,
AVFormatParameters *ap)
{
AnmDemuxContext *anm = s->priv_data;
ByteIOContext *pb = s->pb;
AVIOContext *pb = s->pb;
AVStream *st;
int i, ret;
......@@ -177,7 +177,7 @@ static int read_packet(AVFormatContext *s,
AVPacket *pkt)
{
AnmDemuxContext *anm = s->priv_data;
ByteIOContext *pb = s->pb;
AVIOContext *pb = s->pb;
Page *p;
int tmp, record_size;
......
......@@ -32,7 +32,7 @@ static int apc_probe(AVProbeData *p)
static int apc_read_header(AVFormatContext *s, AVFormatParameters *ap)
{
ByteIOContext *pb = s->pb;
AVIOContext *pb = s->pb;
AVStream *st;
get_le32(pb); /* CRYO */
......
......@@ -151,7 +151,7 @@ static void ape_dumpinfo(AVFormatContext * s, APEContext * ape_ctx)
static int ape_read_header(AVFormatContext * s, AVFormatParameters * ap)
{
ByteIOContext *pb = s->pb;
AVIOContext *pb = s->pb;
APEContext *ape = s->priv_data;
AVStream *st;
uint32_t tag;
......
......@@ -33,7 +33,7 @@
static int ape_tag_read_field(AVFormatContext *s)
{
ByteIOContext *pb = s->pb;
AVIOContext *pb = s->pb;
uint8_t key[1024], *value;
uint32_t size, flags;
int i, c;
......@@ -65,7 +65,7 @@ static int ape_tag_read_field(AVFormatContext *s)
void ff_ape_parse_tag(AVFormatContext *s)
{
ByteIOContext *pb = s->pb;
AVIOContext *pb = s->pb;
int file_size = url_fsize(pb);
uint32_t val, fields, tag_bytes;
uint8_t buf[8];
......
......@@ -50,13 +50,13 @@ struct segment {
/*
* Each variant has its own demuxer. If it currently is active,
* it has an open ByteIOContext too, and potentially an AVPacket
* it has an open AVIOContext too, and potentially an AVPacket
* containing the next packet from this stream.
*/
struct variant {
int bandwidth;
char url[MAX_URL_SIZE];
ByteIOContext *pb;
AVIOContext *pb;
AVFormatContext *ctx;
AVPacket pkt;
int stream_offset;
......@@ -78,7 +78,7 @@ typedef struct AppleHTTPContext {
int max_start_seq, min_end_seq;
} AppleHTTPContext;
static int read_chomp_line(ByteIOContext *s, char *buf, int maxlen)
static int read_chomp_line(AVIOContext *s, char *buf, int maxlen)
{
int len = ff_get_line(s, buf, maxlen);
while (len > 0 && isspace(buf[len - 1]))
......@@ -202,7 +202,7 @@ static void handle_variant_args(struct variant_info *info, const char *key,
}
static int parse_playlist(AppleHTTPContext *c, const char *url,
struct variant *var, ByteIOContext *in)
struct variant *var, AVIOContext *in)
{
int ret = 0, duration = 0, is_segment = 0, is_variant = 0, bandwidth = 0;
char line[1024];
......
......@@ -178,6 +178,6 @@ static av_always_inline int ff_guidcmp(const void *g1, const void *g2)
return memcmp(g1, g2, sizeof(ff_asf_guid));
}
void ff_get_guid(ByteIOContext *s, ff_asf_guid *g);
void ff_get_guid(AVIOContext *s, ff_asf_guid *g);
#endif /* AVFORMAT_ASF_H */
......@@ -132,7 +132,7 @@ static void print_guid(const ff_asf_guid *g)
#define print_guid(g)
#endif
void ff_get_guid(ByteIOContext *s, ff_asf_guid *g)
void ff_get_guid(AVIOContext *s, ff_asf_guid *g)
{
assert(sizeof(*g) == 16);
get_buffer(s, *g, sizeof(*g));
......@@ -147,7 +147,7 @@ static int asf_probe(AVProbeData *pd)
return 0;
}
static int get_value(ByteIOContext *pb, int type){
static int get_value(AVIOContext *pb, int type){
switch(type){
case 2: return get_le32(pb);
case 3: return get_le32(pb);
......@@ -187,7 +187,7 @@ finish:
static int asf_read_file_properties(AVFormatContext *s, int64_t size)
{
ASFContext *asf = s->priv_data;
ByteIOContext *pb = s->pb;
AVIOContext *pb = s->pb;
ff_get_guid(pb, &asf->hdr.guid);
asf->hdr.file_size = get_le64(pb);
......@@ -209,7 +209,7 @@ static int asf_read_file_properties(AVFormatContext *s, int64_t size)
static int asf_read_stream_properties(AVFormatContext *s, int64_t size)
{
ASFContext *asf = s->priv_data;
ByteIOContext *pb = s->pb;
AVIOContext *pb = s->pb;
AVStream *st;
ASFStream *asf_st;
ff_asf_guid g;
......@@ -395,7 +395,7 @@ static int asf_read_stream_properties(AVFormatContext *s, int64_t size)
static int asf_read_ext_stream_properties(AVFormatContext *s, int64_t size)
{
ASFContext *asf = s->priv_data;
ByteIOContext *pb = s->pb;
AVIOContext *pb = s->pb;
ff_asf_guid g;
int ext_len, payload_ext_ct, stream_ct, i;
uint32_t ext_d, leak_rate, stream_num;
......@@ -442,7 +442,7 @@ static int asf_read_ext_stream_properties(AVFormatContext *s, int64_t size)
static int asf_read_content_desc(AVFormatContext *s, int64_t size)
{
ByteIOContext *pb = s->pb;
AVIOContext *pb = s->pb;
int len1, len2, len3, len4, len5;
len1 = get_le16(pb);
......@@ -461,7 +461,7 @@ static int asf_read_content_desc(AVFormatContext *s, int64_t size)
static int asf_read_ext_content_desc(AVFormatContext *s, int64_t size)
{
ByteIOContext *pb = s->pb;
AVIOContext *pb = s->pb;
ASFContext *asf = s->priv_data;
int desc_count, i, ret;
......@@ -496,7 +496,7 @@ static int asf_read_ext_content_desc(AVFormatContext *s, int64_t size)
static int asf_read_language_list(AVFormatContext *s, int64_t size)
{
ByteIOContext *pb = s->pb;
AVIOContext *pb = s->pb;
ASFContext *asf = s->priv_data;
int j, ret;
int stream_count = get_le16(pb);
......@@ -514,7 +514,7 @@ static int asf_read_language_list(AVFormatContext *s, int64_t size)
static int asf_read_metadata(AVFormatContext *s, int64_t size)
{
ByteIOContext *pb = s->pb;
AVIOContext *pb = s->pb;
ASFContext *asf = s->priv_data;
int n, stream_num, name_len, value_len, value_type, value_num;
int ret, i;
......@@ -546,7 +546,7 @@ static int asf_read_metadata(AVFormatContext *s, int64_t size)
static int asf_read_marker(AVFormatContext *s, int64_t size)
{
ByteIOContext *pb = s->pb;
AVIOContext *pb = s->pb;
int i, count, name_len, ret;
char name[1024];
......@@ -581,7 +581,7 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap)
{
ASFContext *asf = s->priv_data;
ff_asf_guid g;
ByteIOContext *pb = s->pb;
AVIOContext *pb = s->pb;
int i;
int64_t gsize;
......@@ -715,7 +715,7 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap)
* @param pb context to read data from
* @return 0 on success, <0 on error
*/
static int ff_asf_get_packet(AVFormatContext *s, ByteIOContext *pb)
static int ff_asf_get_packet(AVFormatContext *s, AVIOContext *pb)
{
ASFContext *asf = s->priv_data;
uint32_t packet_length, padsize;
......@@ -800,7 +800,7 @@ static int ff_asf_get_packet(AVFormatContext *s, ByteIOContext *pb)
*
* @return <0 if error
*/
static int asf_read_frame_header(AVFormatContext *s, ByteIOContext *pb){
static int asf_read_frame_header(AVFormatContext *s, AVIOContext *pb){
ASFContext *asf = s->priv_data;
int rsize = 1;
int num = get_byte(pb);
......@@ -879,7 +879,7 @@ static int asf_read_frame_header(AVFormatContext *s, ByteIOContext *pb){
* @return 0 if data was stored in pkt, <0 on error or 1 if more ASF
* packets need to be loaded (through asf_get_packet())
*/
static int ff_asf_parse_packet(AVFormatContext *s, ByteIOContext *pb, AVPacket *pkt)
static int ff_asf_parse_packet(AVFormatContext *s, AVIOContext *pb, AVPacket *pkt)
{
ASFContext *asf = s->priv_data;
ASFStream *asf_st = 0;
......
......@@ -202,7 +202,7 @@ typedef struct {
int packet_timestamp_end;
unsigned int packet_nb_payloads;
uint8_t packet_buf[PACKET_SIZE];
ByteIOContext pb;
AVIOContext pb;
/* only for reading */
uint64_t data_offset; ///< beginning of the first data packet
......@@ -222,17 +222,17 @@ static const AVCodecTag codec_asf_bmp_tags[] = {
#define PREROLL_TIME 3100
static void put_guid(ByteIOContext *s, const ff_asf_guid *g)
static void put_guid(AVIOContext *s, const ff_asf_guid *g)
{
assert(sizeof(*g) == 16);
put_buffer(s, *g, sizeof(*g));
}
static void put_str16(ByteIOContext *s, const char *tag)
static void put_str16(AVIOContext *s, const char *tag)
{
int len;
uint8_t *pb;
ByteIOContext *dyn_buf;
AVIOContext *dyn_buf;
if (url_open_dyn_buf(&dyn_buf) < 0)
return;
......@@ -243,7 +243,7 @@ static void put_str16(ByteIOContext *s, const char *tag)
av_freep(&pb);
}
static int64_t put_header(ByteIOContext *pb, const ff_asf_guid *g)
static int64_t put_header(AVIOContext *pb, const ff_asf_guid *g)
{
int64_t pos;
......@@ -254,7 +254,7 @@ static int64_t put_header(ByteIOContext *pb, const ff_asf_guid *g)
}
/* update header size */
static void end_header(ByteIOContext *pb, int64_t pos)
static void end_header(AVIOContext *pb, int64_t pos)
{
int64_t pos1;
......@@ -268,7 +268,7 @@ static void end_header(ByteIOContext *pb, int64_t pos)
static void put_chunk(AVFormatContext *s, int type, int payload_length, int flags)
{
ASFContext *asf = s->priv_data;
ByteIOContext *pb = s->pb;
AVIOContext *pb = s->pb;
int length;
length = payload_length + 8;
......@@ -294,7 +294,7 @@ static int64_t unix_to_file_time(int ti)
static int asf_write_header1(AVFormatContext *s, int64_t file_size, int64_t data_chunk_size)
{
ASFContext *asf = s->priv_data;
ByteIOContext *pb = s->pb;
AVIOContext *pb = s->pb;
AVMetadataTag *tags[5];
int header_size, n, extra_size, extra_size2, wav_extra_size, file_time;
int has_title;
......@@ -363,7 +363,7 @@ static int asf_write_header1(AVFormatContext *s, int64_t file_size, int64_t data
if (has_title) {
int len;
uint8_t *buf;
ByteIOContext *dyn_buf;
AVIOContext *dyn_buf;
if (url_open_dyn_buf(&dyn_buf) < 0)
return AVERROR(ENOMEM);
......@@ -479,7 +479,7 @@ static int asf_write_header1(AVFormatContext *s, int64_t file_size, int64_t data
const char *desc;
int len;
uint8_t *buf;
ByteIOContext *dyn_buf;
AVIOContext *dyn_buf;
enc = s->streams[n]->codec;
p = avcodec_find_encoder(enc->codec_id);
......@@ -602,7 +602,7 @@ static int put_payload_parsing_info(
)
{
ASFContext *asf = s->priv_data;
ByteIOContext *pb = s->pb;
AVIOContext *pb = s->pb;
int ppi_size, i;
int64_t start= url_ftell(pb);
......@@ -691,7 +691,7 @@ static void put_payload_header(
)
{
ASFContext *asf = s->priv_data;
ByteIOContext *pb = &asf->pb;
AVIOContext *pb = &asf->pb;
int val;
val = stream->num;
......@@ -832,7 +832,7 @@ static int asf_write_packet(AVFormatContext *s, AVPacket *pkt)
//
static int asf_write_index(AVFormatContext *s, ASFIndex *index, uint16_t max, uint32_t count)
{
ByteIOContext *pb = s->pb;
AVIOContext *pb = s->pb;
int i;
put_guid(pb, &ff_asf_simple_index_header);
......
......@@ -76,7 +76,7 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap)
{
int i, len, header_remaining;
ASSContext *ass = s->priv_data;
ByteIOContext *pb = s->pb;
AVIOContext *pb = s->pb;
AVStream *st;
int allocated[2]={0};
uint8_t *p, **dst[2]={0};
......
......@@ -49,7 +49,7 @@ static const AVCodecTag codec_au_tags[] = {
#if CONFIG_AU_MUXER
/* AUDIO_FILE header */
static int put_au_header(ByteIOContext *pb, AVCodecContext *enc)
static int put_au_header(AVIOContext *pb, AVCodecContext *enc)
{
if(!enc->codec_tag)
return -1;
......@@ -64,7 +64,7 @@ static int put_au_header(ByteIOContext *pb, AVCodecContext *enc)
static int au_write_header(AVFormatContext *s)
{
ByteIOContext *pb = s->pb;
AVIOContext *pb = s->pb;
s->priv_data = NULL;
......@@ -80,14 +80,14 @@ static int au_write_header(AVFormatContext *s)
static int au_write_packet(AVFormatContext *s, AVPacket *pkt)
{
ByteIOContext *pb = s->pb;
AVIOContext *pb = s->pb;
put_buffer(pb, pkt->data, pkt->size);
return 0;
}
static int au_write_trailer(AVFormatContext *s)
{
ByteIOContext *pb = s->pb;
AVIOContext *pb = s->pb;
int64_t file_size;
if (!url_is_streamed(s->pb)) {
......@@ -121,7 +121,7 @@ static int au_read_header(AVFormatContext *s,
{
int size;
unsigned int tag;
ByteIOContext *pb = s->pb;
AVIOContext *pb = s->pb;
unsigned int id, channels, rate;
enum CodecID codec;
AVStream *st;
......
......@@ -67,7 +67,7 @@ const uint8_t *ff_avc_find_startcode(const uint8_t *p, const uint8_t *end){
return out;
}
int ff_avc_parse_nal_units(ByteIOContext *pb, const uint8_t *buf_in, int size)
int ff_avc_parse_nal_units(AVIOContext *pb, const uint8_t *buf_in, int size)
{
const uint8_t *p = buf_in;
const uint8_t *end = p + size;
......@@ -88,7 +88,7 @@ int ff_avc_parse_nal_units(ByteIOContext *pb, const uint8_t *buf_in, int size)
int ff_avc_parse_nal_units_buf(const uint8_t *buf_in, uint8_t **buf, int *size)
{
ByteIOContext *pb;
AVIOContext *pb;
int ret = url_open_dyn_buf(&pb);
if(ret < 0)
return ret;
......@@ -100,7 +100,7 @@ int ff_avc_parse_nal_units_buf(const uint8_t *buf_in, uint8_t **buf, int *size)
return 0;
}
int ff_isom_write_avcc(ByteIOContext *pb, const uint8_t *data, int len)
int ff_isom_write_avcc(AVIOContext *pb, const uint8_t *data, int len)
{
if (len > 6) {
/* check for h264 start code */
......
......@@ -25,9 +25,9 @@
#include <stdint.h>
#include "avio.h"
int ff_avc_parse_nal_units(ByteIOContext *s, const uint8_t *buf, int size);
int ff_avc_parse_nal_units(AVIOContext *s, const uint8_t *buf, int size);
int ff_avc_parse_nal_units_buf(const uint8_t *buf_in, uint8_t **buf, int *size);
int ff_isom_write_avcc(ByteIOContext *pb, const uint8_t *data, int len);
int ff_isom_write_avcc(AVIOContext *pb, const uint8_t *data, int len);
const uint8_t *ff_avc_find_startcode(const uint8_t *p, const uint8_t *end);
#endif /* AVFORMAT_AVC_H */
......@@ -193,7 +193,7 @@ void av_metadata_free(AVMetadata **m);
* @param size desired payload size
* @return >0 (read size) if OK, AVERROR_xxx otherwise
*/
int av_get_packet(ByteIOContext *s, AVPacket *pkt, int size);
int av_get_packet(AVIOContext *s, AVPacket *pkt, int size);
/**
......@@ -209,7 +209,7 @@ int av_get_packet(ByteIOContext *s, AVPacket *pkt, int size);
* @return >0 (read size) if OK, AVERROR_xxx otherwise, previous data
* will not be lost even if an error occurs.
*/
int av_append_packet(ByteIOContext *s, AVPacket *pkt, int size);
int av_append_packet(AVIOContext *s, AVPacket *pkt, int size);
/*************************************************/
/* fractional numbers for exact pts handling */
......@@ -688,7 +688,7 @@ typedef struct AVFormatContext {
struct AVInputFormat *iformat;
struct AVOutputFormat *oformat;
void *priv_data;
ByteIOContext *pb;
AVIOContext *pb;
unsigned int nb_streams;
#if FF_API_MAX_STREAMS
AVStream *streams[MAX_STREAMS];
......@@ -1060,7 +1060,7 @@ AVInputFormat *av_probe_input_format2(AVProbeData *pd, int is_opened, int *score
* @return 0 in case of success, a negative value corresponding to an
* AVERROR code otherwise
*/
int av_probe_input_buffer(ByteIOContext *pb, AVInputFormat **fmt,
int av_probe_input_buffer(AVIOContext *pb, AVInputFormat **fmt,
const char *filename, void *logctx,
unsigned int offset, unsigned int max_probe_size);
......@@ -1069,7 +1069,7 @@ int av_probe_input_buffer(ByteIOContext *pb, AVInputFormat **fmt,
* This does not open the needed codecs for decoding the stream[s].
*/
int av_open_input_stream(AVFormatContext **ic_ptr,
ByteIOContext *pb, const char *filename,
AVIOContext *pb, const char *filename,
AVInputFormat *fmt, AVFormatParameters *ap);
/**
......
......@@ -100,7 +100,7 @@ static inline int get_duration(AVIStream *ast, int len){
return 1;
}
static int get_riff(AVFormatContext *s, ByteIOContext *pb)
static int get_riff(AVFormatContext *s, AVIOContext *pb)
{
AVIContext *avi = s->priv_data;
char header[8];
......@@ -126,7 +126,7 @@ static int get_riff(AVFormatContext *s, ByteIOContext *pb)
static int read_braindead_odml_indx(AVFormatContext *s, int frame_num){
AVIContext *avi = s->priv_data;
ByteIOContext *pb = s->pb;
AVIOContext *pb = s->pb;
int longs_pre_entry= get_le16(pb);
int index_sub_type = get_byte(pb);
int index_type = get_byte(pb);
......@@ -246,7 +246,7 @@ static void clean_index(AVFormatContext *s){
static int avi_read_tag(AVFormatContext *s, AVStream *st, uint32_t tag, uint32_t size)
{
ByteIOContext *pb = s->pb;
AVIOContext *pb = s->pb;
char key[5] = {0}, *value;
size += (size & 1);
......@@ -335,7 +335,7 @@ static void avi_read_nikon(AVFormatContext *s, uint64_t end)
static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
{
AVIContext *avi = s->priv_data;
ByteIOContext *pb = s->pb;
AVIOContext *pb = s->pb;
unsigned int tag, tag1, handler;
int codec_type, stream_index, frame_period, bit_rate;
unsigned int size;
......@@ -752,7 +752,7 @@ static int read_gab2_sub(AVStream *st, AVPacket *pkt) {
AVIStream *ast = st->priv_data;
AVInputFormat *sub_demuxer;
AVRational time_base;
ByteIOContext *pb = av_alloc_put_byte(pkt->data + 7,
AVIOContext *pb = av_alloc_put_byte(pkt->data + 7,
pkt->size - 7,
0, NULL, NULL, NULL, NULL);
AVProbeData pd;
......@@ -834,7 +834,7 @@ static int get_stream_idx(int *d){
static int avi_read_packet(AVFormatContext *s, AVPacket *pkt)
{
AVIContext *avi = s->priv_data;
ByteIOContext *pb = s->pb;
AVIOContext *pb = s->pb;
int n, d[8];
unsigned int size;
int64_t i, sync;
......@@ -1110,7 +1110,7 @@ resync:
static int avi_read_idx1(AVFormatContext *s, int size)
{
AVIContext *avi = s->priv_data;
ByteIOContext *pb = s->pb;
AVIOContext *pb = s->pb;
int nb_index_entries, i;
AVStream *st;
AVIStream *ast;
......@@ -1192,7 +1192,7 @@ static int guess_ni_flag(AVFormatContext *s){
static int avi_load_index(AVFormatContext *s)
{
AVIContext *avi = s->priv_data;
ByteIOContext *pb = s->pb;
AVIOContext *pb = s->pb;
uint32_t tag, size;
int64_t pos= url_ftell(pb);
int ret = -1;
......
......@@ -63,7 +63,7 @@ static inline AVIIentry* avi_get_ientry(AVIIndex* idx, int ent_id)
return &idx->cluster[cl][id];
}
static int64_t avi_start_new_riff(AVFormatContext *s, ByteIOContext *pb,
static int64_t avi_start_new_riff(AVFormatContext *s, AVIOContext *pb,
const char* riff_tag, const char* list_tag)
{
AVIContext *avi= s->priv_data;
......@@ -102,7 +102,7 @@ static char* avi_stream2fourcc(char* tag, int index, enum AVMediaType type)
return tag;
}