Mercurial > libavformat.hg
changeset 65:a58a8a53eb46 libavformat
* UINTX -> uintx_t INTX -> intx_t
author | kabi |
---|---|
date | Tue, 11 Feb 2003 16:35:48 +0000 |
parents | b0e0eb595e29 |
children | ad9bcf041e8e |
files | asf.c au.c audio.c avformat.h avidec.c avienc.c avio.h aviobuf.c crc.c dv1394.c ffm.c framehook.c framehook.h gif.c grab.c http.c img.c jpeg.c mov.c mpeg.c mpegts.c mpjpeg.c pnm.c raw.c rm.c rtp.c rtpproto.c rtsp.h swf.c tcp.c udp.c utils.c wav.c yuv.c yuv4mpeg.c |
diffstat | 35 files changed, 295 insertions(+), 295 deletions(-) [+] |
line wrap: on
line diff
--- a/asf.c Mon Feb 10 09:35:32 2003 +0000 +++ b/asf.c Tue Feb 11 16:35:48 2003 +0000 @@ -31,7 +31,7 @@ AVPacket pkt; int frag_offset; int timestamp; - INT64 duration; + int64_t duration; int ds_span; /* descrambling */ int ds_packet_size; @@ -42,10 +42,10 @@ } ASFStream; typedef struct { - UINT32 v1; - UINT16 v2; - UINT16 v3; - UINT8 v4[8]; + uint32_t v1; + uint16_t v2; + uint16_t v3; + uint8_t v4[8]; } GUID; typedef struct __attribute__((packed)) { @@ -83,14 +83,14 @@ int asfid2avid[128]; /* conversion table from asf ID 2 AVStream ID */ ASFStream streams[128]; /* it's max number and it's not that big */ /* non streamed additonnal info */ - INT64 nb_packets; - INT64 duration; /* in 100ns units */ + int64_t nb_packets; + int64_t duration; /* in 100ns units */ /* packet filling */ int packet_size_left; int packet_timestamp_start; int packet_timestamp_end; int packet_nb_frames; - UINT8 packet_buf[PACKET_SIZE]; + uint8_t packet_buf[PACKET_SIZE]; ByteIOContext pb; /* only for reading */ uint64_t data_offset; /* begining of the first data packet */ @@ -199,7 +199,7 @@ put_le16(s,strlen(tag) + 1); for(;;) { - c = (UINT8)*tag++; + c = (uint8_t)*tag++; put_le16(s, c); if (c == '\0') break; @@ -211,16 +211,16 @@ int c; for(;;) { - c = (UINT8)*tag++; + c = (uint8_t)*tag++; put_le16(s, c); if (c == '\0') break; } } -static INT64 put_header(ByteIOContext *pb, const GUID *g) +static int64_t put_header(ByteIOContext *pb, const GUID *g) { - INT64 pos; + int64_t pos; pos = url_ftell(pb); put_guid(pb, g); @@ -229,9 +229,9 @@ } /* update header size */ -static void end_header(ByteIOContext *pb, INT64 pos) +static void end_header(ByteIOContext *pb, int64_t pos) { - INT64 pos1; + int64_t pos1; pos1 = url_ftell(pb); url_fseek(pb, pos + 16, SEEK_SET); @@ -256,24 +256,24 @@ } /* convert from unix to windows time */ -static INT64 unix_to_file_time(int ti) +static int64_t unix_to_file_time(int ti) { - INT64 t; + int64_t t; - t = ti * INT64_C(10000000); - t += INT64_C(116444736000000000); + t = ti * int64_t_C(10000000); + t += int64_t_C(116444736000000000); return t; } /* write the header (used two times if non streamed) */ -static int asf_write_header1(AVFormatContext *s, INT64 file_size, INT64 data_chunk_size) +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; int header_size, n, extra_size, extra_size2, wav_extra_size, file_time; int has_title; AVCodecContext *enc; - INT64 header_offset, cur_pos, hpos; + int64_t header_offset, cur_pos, hpos; int bit_rate; has_title = (s->title[0] || s->author[0] || s->copyright[0] || s->comment[0]); @@ -337,7 +337,7 @@ /* stream headers */ for(n=0;n<s->nb_streams;n++) { - INT64 es_pos; + int64_t es_pos; // ASFStream *stream = &asf->streams[n]; enc = &s->streams[n]->codec; @@ -574,7 +574,7 @@ crap. They have misread the MPEG Systems spec ! */ static void put_frame(AVFormatContext *s, ASFStream *stream, int timestamp, - UINT8 *buf, int payload_size) + uint8_t *buf, int payload_size) { ASFContext *asf = s->priv_data; int frag_pos, frag_len, frag_len1; @@ -607,22 +607,22 @@ static int asf_write_packet(AVFormatContext *s, int stream_index, - UINT8 *buf, int size, int timestamp) + uint8_t *buf, int size, int timestamp) { ASFContext *asf = s->priv_data; ASFStream *stream; - INT64 duration; + int64_t duration; AVCodecContext *codec; codec = &s->streams[stream_index]->codec; stream = &asf->streams[stream_index]; if (codec->codec_type == CODEC_TYPE_AUDIO) { - duration = (codec->frame_number * codec->frame_size * INT64_C(10000000)) / + duration = (codec->frame_number * codec->frame_size * int64_t_C(10000000)) / codec->sample_rate; } else { duration = codec->frame_number * - ((INT64_C(10000000) * FRAME_RATE_BASE) / codec->frame_rate); + ((int64_t_C(10000000) * FRAME_RATE_BASE) / codec->frame_rate); } if (duration > asf->duration) asf->duration = duration; @@ -634,7 +634,7 @@ static int asf_write_trailer(AVFormatContext *s) { ASFContext *asf = s->priv_data; - INT64 file_size; + int64_t file_size; /* flush the current packet */ if (asf->pb.buf_ptr > asf->pb.buffer) @@ -746,7 +746,7 @@ AVStream *st; ASFStream *asf_st; int size, i; - INT64 gsize; + int64_t gsize; av_set_pts_info(s, 32, 1, 1000); /* 32 bit pts in ms */ @@ -786,7 +786,7 @@ } else if (!memcmp(&g, &stream_header, sizeof(GUID))) { int type, total_size; unsigned int tag1; - INT64 pos1, pos2; + int64_t pos1, pos2; pos1 = url_ftell(pb);
--- a/au.c Mon Feb 10 09:35:32 2003 +0000 +++ b/au.c Tue Feb 11 16:35:48 2003 +0000 @@ -29,7 +29,7 @@ #include "avi.h" /* if we don't know the size in advance */ -#define AU_UNKOWN_SIZE ((UINT32)(~0)) +#define AU_UNKOWN_SIZE ((uint32_t)(~0)) /* The ffmpeg codecs we support, and the IDs they have in the file */ static const CodecTag codec_au_tags[] = { @@ -50,9 +50,9 @@ put_tag(pb, ".snd"); /* magic number */ put_be32(pb, 24); /* header size */ put_be32(pb, AU_UNKOWN_SIZE); /* data size */ - put_be32(pb, (UINT32)tag); /* codec ID */ + put_be32(pb, (uint32_t)tag); /* codec ID */ put_be32(pb, enc->sample_rate); - put_be32(pb, (UINT32)enc->channels); + put_be32(pb, (uint32_t)enc->channels); return 0; } @@ -73,7 +73,7 @@ } static int au_write_packet(AVFormatContext *s, int stream_index_ptr, - UINT8 *buf, int size, int force_pts) + uint8_t *buf, int size, int force_pts) { ByteIOContext *pb = &s->pb; put_buffer(pb, buf, size); @@ -90,7 +90,7 @@ /* update file size */ file_size = url_ftell(pb); url_fseek(pb, 8, SEEK_SET); - put_be32(pb, (UINT32)(file_size - 24)); + put_be32(pb, (uint32_t)(file_size - 24)); url_fseek(pb, file_size, SEEK_SET); put_flush_packet(pb);
--- a/audio.c Mon Feb 10 09:35:32 2003 +0000 +++ b/audio.c Tue Feb 11 16:35:48 2003 +0000 @@ -37,7 +37,7 @@ int frame_size; /* in bytes ! */ int codec_id; int flip_left : 1; - UINT8 buffer[AUDIO_BLOCK_SIZE]; + uint8_t buffer[AUDIO_BLOCK_SIZE]; int buffer_ptr; } AudioData; @@ -165,7 +165,7 @@ } static int audio_write_packet(AVFormatContext *s1, int stream_index, - UINT8 *buf, int size, int force_pts) + uint8_t *buf, int size, int force_pts) { AudioData *s = s1->priv_data; int len, ret;
--- a/avformat.h Mon Feb 10 09:35:32 2003 +0000 +++ b/avformat.h Tue Feb 11 16:35:48 2003 +0000 @@ -18,8 +18,8 @@ #define AV_NOPTS_VALUE 0 typedef struct AVPacket { - INT64 pts; /* presentation time stamp in stream units (set av_set_pts_info) */ - UINT8 *data; + int64_t pts; /* presentation time stamp in stream units (set av_set_pts_info) */ + uint8_t *data; int size; int stream_index; int flags; @@ -54,12 +54,12 @@ /* the exact value of the fractional number is: 'val + num / den'. num is assumed to be such as 0 <= num < den */ typedef struct AVFrac { - INT64 val, num, den; + int64_t val, num, den; } AVFrac; -void av_frac_init(AVFrac *f, INT64 val, INT64 num, INT64 den); -void av_frac_add(AVFrac *f, INT64 incr); -void av_frac_set(AVFrac *f, INT64 val); +void av_frac_init(AVFrac *f, int64_t val, int64_t num, int64_t den); +void av_frac_add(AVFrac *f, int64_t incr); +void av_frac_set(AVFrac *f, int64_t val); /*************************************************/ /* input/output formats */ @@ -141,7 +141,7 @@ int (*read_close)(struct AVFormatContext *); /* seek at or before a given pts (given in microsecond). The pts origin is defined by the stream */ - int (*read_seek)(struct AVFormatContext *, INT64 pts); + int (*read_seek)(struct AVFormatContext *, int64_t pts); /* can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER, AVFMT_NOHEADER */ int flags; /* if extensions are defined, then no probe is done. You should @@ -337,20 +337,20 @@ AVOutputFormat *guess_format(const char *short_name, const char *filename, const char *mime_type); -void av_hex_dump(UINT8 *buf, int size); +void av_hex_dump(uint8_t *buf, int size); void av_register_all(void); typedef struct FifoBuffer { - UINT8 *buffer; - UINT8 *rptr, *wptr, *end; + uint8_t *buffer; + uint8_t *rptr, *wptr, *end; } FifoBuffer; int fifo_init(FifoBuffer *f, int size); void fifo_free(FifoBuffer *f); -int fifo_size(FifoBuffer *f, UINT8 *rptr); -int fifo_read(FifoBuffer *f, UINT8 *buf, int buf_size, UINT8 **rptr_ptr); -void fifo_write(FifoBuffer *f, UINT8 *buf, int size, UINT8 **wptr_ptr); +int fifo_size(FifoBuffer *f, uint8_t *rptr); +int fifo_read(FifoBuffer *f, uint8_t *buf, int buf_size, uint8_t **rptr_ptr); +void fifo_write(FifoBuffer *f, uint8_t *buf, int size, uint8_t **wptr_ptr); /* media file input */ AVInputFormat *av_find_input_format(const char *short_name); @@ -386,9 +386,9 @@ const char *url, int is_output); int parse_image_size(int *width_ptr, int *height_ptr, const char *str); -INT64 parse_date(const char *datestr, int duration); +int64_t parse_date(const char *datestr, int duration); -INT64 av_gettime(void); +int64_t av_gettime(void); /* ffm specific for ffserver */ #define FFM_PACKET_SIZE 4096
--- a/avidec.c Mon Feb 10 09:35:32 2003 +0000 +++ b/avidec.c Tue Feb 11 16:35:48 2003 +0000 @@ -28,7 +28,7 @@ } AVIIndex; typedef struct { - INT64 movi_end; + int64_t movi_end; offset_t movi_list; AVIIndex *first, *last; } AVIContext; @@ -49,7 +49,7 @@ { AVIContext *avi = s->priv_data; ByteIOContext *pb = &s->pb; - UINT32 tag, tag1; + uint32_t tag, tag1; int codec_type, stream_index, frame_period, bit_rate; unsigned int size; int i; @@ -144,7 +144,7 @@ st->codec.width = get_le32(pb); st->codec.height = get_le32(pb); if (frame_period) - st->codec.frame_rate = (INT64_C(1000000) * FRAME_RATE_BASE) / frame_period; + st->codec.frame_rate = (int64_t_C(1000000) * FRAME_RATE_BASE) / frame_period; else st->codec.frame_rate = 25 * FRAME_RATE_BASE; get_le16(pb); /* panes */
--- a/avienc.c Mon Feb 10 09:35:32 2003 +0000 +++ b/avienc.c Tue Feb 11 16:35:48 2003 +0000 @@ -49,7 +49,7 @@ pos = url_ftell(pb); url_fseek(pb, start - 4, SEEK_SET); - put_le32(pb, (UINT32)(pos - start)); + put_le32(pb, (uint32_t)(pos - start)); url_fseek(pb, pos, SEEK_SET); } @@ -211,7 +211,7 @@ nb_frames = 0; if(video_enc){ - put_le32(pb, (UINT32)(INT64_C(1000000) * FRAME_RATE_BASE / video_enc->frame_rate)); + put_le32(pb, (uint32_t)(int64_t_C(1000000) * FRAME_RATE_BASE / video_enc->frame_rate)); } else { put_le32(pb, 0); } @@ -320,7 +320,7 @@ } static int avi_write_packet(AVFormatContext *s, int stream_index, - UINT8 *buf, int size, int force_pts) + uint8_t *buf, int size, int force_pts) { AVIContext *avi = s->priv_data; ByteIOContext *pb = &s->pb; @@ -395,7 +395,7 @@ /* update file size */ file_size = url_ftell(pb); url_fseek(pb, 4, SEEK_SET); - put_le32(pb, (UINT32)(file_size - 8)); + put_le32(pb, (uint32_t)(file_size - 8)); /* Fill in frame/sample counters */ nb_frames = 0;
--- a/avio.h Mon Feb 10 09:35:32 2003 +0000 +++ b/avio.h Tue Feb 11 16:35:48 2003 +0000 @@ -3,7 +3,7 @@ /* output byte stream handling */ -typedef INT64 offset_t; +typedef int64_t offset_t; /* unbuffered I/O */ @@ -60,8 +60,8 @@ int buffer_size; unsigned char *buf_ptr, *buf_end; void *opaque; - int (*read_packet)(void *opaque, UINT8 *buf, int buf_size); - void (*write_packet)(void *opaque, UINT8 *buf, int buf_size); + int (*read_packet)(void *opaque, uint8_t *buf, int buf_size); + void (*write_packet)(void *opaque, uint8_t *buf, int buf_size); int (*seek)(void *opaque, offset_t offset, int whence); offset_t pos; /* position in the file of the current buffer */ int must_flush; /* true if the next seek should flush */ @@ -76,14 +76,14 @@ int buffer_size, int write_flag, void *opaque, - int (*read_packet)(void *opaque, UINT8 *buf, int buf_size), - void (*write_packet)(void *opaque, UINT8 *buf, int buf_size), + int (*read_packet)(void *opaque, uint8_t *buf, int buf_size), + void (*write_packet)(void *opaque, uint8_t *buf, int buf_size), int (*seek)(void *opaque, offset_t offset, int whence)); void put_byte(ByteIOContext *s, int b); void put_buffer(ByteIOContext *s, const unsigned char *buf, int size); -void put_le64(ByteIOContext *s, UINT64 val); -void put_be64(ByteIOContext *s, UINT64 val); +void put_le64(ByteIOContext *s, uint64_t val); +void put_be64(ByteIOContext *s, uint64_t val); void put_le32(ByteIOContext *s, unsigned int val); void put_be32(ByteIOContext *s, unsigned int val); void put_le16(ByteIOContext *s, unsigned int val); @@ -108,14 +108,14 @@ int get_buffer(ByteIOContext *s, unsigned char *buf, int size); int get_byte(ByteIOContext *s); unsigned int get_le32(ByteIOContext *s); -UINT64 get_le64(ByteIOContext *s); +uint64_t get_le64(ByteIOContext *s); unsigned int get_le16(ByteIOContext *s); double get_be64_double(ByteIOContext *s); char *get_strz(ByteIOContext *s, char *buf, int maxlen); unsigned int get_be16(ByteIOContext *s); unsigned int get_be32(ByteIOContext *s); -UINT64 get_be64(ByteIOContext *s); +uint64_t get_be64(ByteIOContext *s); static inline int url_is_streamed(ByteIOContext *s) { @@ -129,12 +129,12 @@ URLContext *url_fileno(ByteIOContext *s); int url_fget_max_packet_size(ByteIOContext *s); -int url_open_buf(ByteIOContext *s, UINT8 *buf, int buf_size, int flags); +int url_open_buf(ByteIOContext *s, uint8_t *buf, int buf_size, int flags); int url_close_buf(ByteIOContext *s); int url_open_dyn_buf(ByteIOContext *s); int url_open_dyn_packet_buf(ByteIOContext *s, int max_packet_size); -int url_close_dyn_buf(ByteIOContext *s, UINT8 **pbuffer); +int url_close_dyn_buf(ByteIOContext *s, uint8_t **pbuffer); /* file.c */ extern URLProtocol file_protocol;
--- a/aviobuf.c Mon Feb 10 09:35:32 2003 +0000 +++ b/aviobuf.c Tue Feb 11 16:35:48 2003 +0000 @@ -27,8 +27,8 @@ int buffer_size, int write_flag, void *opaque, - int (*read_packet)(void *opaque, UINT8 *buf, int buf_size), - void (*write_packet)(void *opaque, UINT8 *buf, int buf_size), + int (*read_packet)(void *opaque, uint8_t *buf, int buf_size), + void (*write_packet)(void *opaque, uint8_t *buf, int buf_size), int (*seek)(void *opaque, offset_t offset, int whence)) { s->buffer = buffer; @@ -182,7 +182,7 @@ { union { double d; - UINT64 ull; + uint64_t ull; } u; u.d = val; put_be64(s, u.ull); @@ -196,16 +196,16 @@ put_byte(s, 0); } -void put_le64(ByteIOContext *s, UINT64 val) +void put_le64(ByteIOContext *s, uint64_t val) { - put_le32(s, (UINT32)(val & 0xffffffff)); - put_le32(s, (UINT32)(val >> 32)); + put_le32(s, (uint32_t)(val & 0xffffffff)); + put_le32(s, (uint32_t)(val >> 32)); } -void put_be64(ByteIOContext *s, UINT64 val) +void put_be64(ByteIOContext *s, uint64_t val) { - put_be32(s, (UINT32)(val >> 32)); - put_be32(s, (UINT32)(val & 0xffffffff)); + put_be32(s, (uint32_t)(val >> 32)); + put_be32(s, (uint32_t)(val & 0xffffffff)); } void put_le16(ByteIOContext *s, unsigned int val) @@ -320,11 +320,11 @@ return val; } -UINT64 get_le64(ByteIOContext *s) +uint64_t get_le64(ByteIOContext *s) { - UINT64 val; - val = (UINT64)get_le32(s); - val |= (UINT64)get_le32(s) << 32; + uint64_t val; + val = (uint64_t)get_le32(s); + val |= (uint64_t)get_le32(s) << 32; return val; } @@ -350,7 +350,7 @@ { union { double d; - UINT64 ull; + uint64_t ull; } u; u.ull = get_be64(s); @@ -372,29 +372,29 @@ return buf; } -UINT64 get_be64(ByteIOContext *s) +uint64_t get_be64(ByteIOContext *s) { - UINT64 val; - val = (UINT64)get_be32(s) << 32; - val |= (UINT64)get_be32(s); + uint64_t val; + val = (uint64_t)get_be32(s) << 32; + val |= (uint64_t)get_be32(s); return val; } /* link with avio functions */ -static void url_write_packet(void *opaque, UINT8 *buf, int buf_size) +static void url_write_packet(void *opaque, uint8_t *buf, int buf_size) { URLContext *h = opaque; url_write(h, buf, buf_size); } -static int url_read_packet(void *opaque, UINT8 *buf, int buf_size) +static int url_read_packet(void *opaque, uint8_t *buf, int buf_size) { URLContext *h = opaque; return url_read(h, buf, buf_size); } -static int url_seek_packet(void *opaque, INT64 offset, int whence) +static int url_seek_packet(void *opaque, int64_t offset, int whence) { URLContext *h = opaque; url_seek(h, offset, whence); @@ -403,7 +403,7 @@ int url_fdopen(ByteIOContext *s, URLContext *h) { - UINT8 *buffer; + uint8_t *buffer; int buffer_size, max_packet_size; @@ -431,7 +431,7 @@ /* XXX: must be called before any I/O */ int url_setbufsize(ByteIOContext *s, int buf_size) { - UINT8 *buffer; + uint8_t *buffer; buffer = av_malloc(buf_size); if (!buffer) return -ENOMEM; @@ -530,7 +530,7 @@ } /* buffer handling */ -int url_open_buf(ByteIOContext *s, UINT8 *buf, int buf_size, int flags) +int url_open_buf(ByteIOContext *s, uint8_t *buf, int buf_size, int flags) { return init_put_byte(s, buf, buf_size, (flags & URL_WRONLY) != 0, NULL, NULL, NULL, NULL); @@ -547,16 +547,16 @@ typedef struct DynBuffer { int pos, size, allocated_size; - UINT8 *buffer; + uint8_t *buffer; int io_buffer_size; - UINT8 io_buffer[1]; + uint8_t io_buffer[1]; } DynBuffer; -static void dyn_buf_write(void *opaque, UINT8 *buf, int buf_size) +static void dyn_buf_write(void *opaque, uint8_t *buf, int buf_size) { DynBuffer *d = opaque; int new_size, new_allocated_size; - UINT8 *new_buffer; + uint8_t *new_buffer; /* reallocate buffer if needed */ new_size = d->pos + buf_size; @@ -583,7 +583,7 @@ d->size = d->pos; } -static void dyn_packet_buf_write(void *opaque, UINT8 *buf, int buf_size) +static void dyn_packet_buf_write(void *opaque, uint8_t *buf, int buf_size) { unsigned char buf1[4]; @@ -674,7 +674,7 @@ * @param pointer to a byte buffer * @return the length of the byte buffer */ -int url_close_dyn_buf(ByteIOContext *s, UINT8 **pbuffer) +int url_close_dyn_buf(ByteIOContext *s, uint8_t **pbuffer) { DynBuffer *d = s->opaque; int size;
--- a/crc.c Mon Feb 10 09:35:32 2003 +0000 +++ b/crc.c Tue Feb 11 16:35:48 2003 +0000 @@ -33,7 +33,7 @@ #define DO8(buf) DO4(buf); DO4(buf); #define DO16(buf) DO8(buf); DO8(buf); -static UINT32 adler32(UINT32 adler, UINT8 *buf, unsigned int len) +static uint32_t adler32(uint32_t adler, uint8_t *buf, unsigned int len) { unsigned long s1 = adler & 0xffff; unsigned long s2 = (adler >> 16) & 0xffff; @@ -58,7 +58,7 @@ } typedef struct CRCState { - UINT32 crcval; + uint32_t crcval; } CRCState; static int crc_write_header(struct AVFormatContext *s)
--- a/dv1394.c Mon Feb 10 09:35:32 2003 +0000 +++ b/dv1394.c Tue Feb 11 16:35:48 2003 +0000 @@ -46,7 +46,7 @@ int done; /* Number of completed frames */ int stream; /* Current stream. 0 - video, 1 - audio */ - INT64 pts; /* Current timestamp */ + int64_t pts; /* Current timestamp */ }; static int dv1394_reset(struct dv1394_data *dv)
--- a/ffm.c Mon Feb 10 09:35:32 2003 +0000 +++ b/ffm.c Tue Feb 11 16:35:48 2003 +0000 @@ -28,7 +28,7 @@ #define FLAG_KEY_FRAME 0x01 typedef struct FFMStream { - INT64 pts; + int64_t pts; } FFMStream; enum { @@ -40,15 +40,15 @@ /* only reading mode */ offset_t write_index, file_size; int read_state; - UINT8 header[FRAME_HEADER_SIZE]; + uint8_t header[FRAME_HEADER_SIZE]; /* read and write */ int first_packet; /* true if first packet, needed to set the discontinuity tag */ int packet_size; int frame_offset; - INT64 pts; - UINT8 *packet_ptr, *packet_end; - UINT8 packet[FFM_PACKET_SIZE]; + int64_t pts; + uint8_t *packet_ptr, *packet_end; + uint8_t packet[FFM_PACKET_SIZE]; } FFMContext; /* disable pts hack for testing */ @@ -82,8 +82,8 @@ /* 'first' is true if first data of a frame */ static void ffm_write_data(AVFormatContext *s, - UINT8 *buf, int size, - INT64 pts, int first) + uint8_t *buf, int size, + int64_t pts, int first) { FFMContext *ffm = s->priv_data; int len; @@ -214,12 +214,12 @@ } static int ffm_write_packet(AVFormatContext *s, int stream_index, - UINT8 *buf, int size, int force_pts) + uint8_t *buf, int size, int force_pts) { AVStream *st = s->streams[stream_index]; FFMStream *fst = st->priv_data; - INT64 pts; - UINT8 header[FRAME_HEADER_SIZE]; + int64_t pts; + uint8_t header[FRAME_HEADER_SIZE]; int duration; if (st->codec.codec_type == CODEC_TYPE_AUDIO) { @@ -260,7 +260,7 @@ put_flush_packet(pb); if (!url_is_streamed(pb)) { - INT64 size; + int64_t size; /* update the write offset */ size = url_ftell(pb); url_fseek(pb, 8, SEEK_SET); @@ -305,7 +305,7 @@ /* first is true if we read the frame header */ static int ffm_read_data(AVFormatContext *s, - UINT8 *buf, int size, int first) + uint8_t *buf, int size, int first) { FFMContext *ffm = s->priv_data; ByteIOContext *pb = &s->pb; @@ -368,7 +368,7 @@ ByteIOContext *pb = &s->pb; AVCodecContext *codec; int i; - UINT32 tag; + uint32_t tag; /* header */ tag = get_le32(pb); @@ -382,7 +382,7 @@ if (!url_is_streamed(pb)) { ffm->file_size = url_filesize(url_fileno(pb)); } else { - ffm->file_size = (UINT64_C(1) << 63) - 1; + ffm->file_size = (uint64_t_C(1) << 63) - 1; } s->nb_streams = get_be32(pb); @@ -411,7 +411,7 @@ /* specific info */ switch(codec->codec_type) { case CODEC_TYPE_VIDEO: - codec->frame_rate = ((INT64)get_be32(pb) * FRAME_RATE_BASE) / 1000; + codec->frame_rate = ((int64_t)get_be32(pb) * FRAME_RATE_BASE) / 1000; codec->width = get_be16(pb); codec->height = get_be16(pb); codec->gop_size = get_be16(pb); @@ -539,10 +539,10 @@ url_fseek(pb, pos, SEEK_SET); } -static INT64 get_pts(AVFormatContext *s, offset_t pos) +static int64_t get_pts(AVFormatContext *s, offset_t pos) { ByteIOContext *pb = &s->pb; - INT64 pts; + int64_t pts; ffm_seek1(s, pos); url_fskip(pb, 4); @@ -556,11 +556,11 @@ /* seek to a given time in the file. The file read pointer is positionned at or before pts. XXX: the following code is quite approximative */ -static int ffm_seek(AVFormatContext *s, INT64 wanted_pts) +static int ffm_seek(AVFormatContext *s, int64_t wanted_pts) { FFMContext *ffm = s->priv_data; offset_t pos_min, pos_max, pos; - INT64 pts_min, pts_max, pts; + int64_t pts_min, pts_max, pts; double pos1; #ifdef DEBUG_SEEK @@ -576,7 +576,7 @@ /* linear interpolation */ pos1 = (double)(pos_max - pos_min) * (double)(wanted_pts - pts_min) / (double)(pts_max - pts_min); - pos = (((INT64)pos1) / FFM_PACKET_SIZE) * FFM_PACKET_SIZE; + pos = (((int64_t)pos1) / FFM_PACKET_SIZE) * FFM_PACKET_SIZE; if (pos <= pos_min) pos = pos_min; else if (pos >= pos_max) @@ -601,7 +601,7 @@ offset_t ffm_read_write_index(int fd) { - UINT8 buf[8]; + uint8_t buf[8]; offset_t pos; int i; @@ -615,7 +615,7 @@ void ffm_write_write_index(int fd, offset_t pos) { - UINT8 buf[8]; + uint8_t buf[8]; int i; for(i=0;i<8;i++)
--- a/framehook.c Mon Feb 10 09:35:32 2003 +0000 +++ b/framehook.c Tue Feb 11 16:35:48 2003 +0000 @@ -95,7 +95,7 @@ { if (first_hook) { FrameHookEntry *fhe; - INT64 pts = av_gettime(); + int64_t pts = av_gettime(); for (fhe = first_hook; fhe; fhe = fhe->next) { fhe->Process(fhe->ctx, pict, pix_fmt, width, height, pts);
--- a/framehook.h Mon Feb 10 09:35:32 2003 +0000 +++ b/framehook.h Tue Feb 11 16:35:48 2003 +0000 @@ -13,7 +13,7 @@ extern FrameHookConfigure Configure; /* Function must be called 'Process' */ -typedef void (FrameHookProcess)(void *ctx, struct AVPicture *pict, enum PixelFormat pix_fmt, int width, int height, INT64 pts); +typedef void (FrameHookProcess)(void *ctx, struct AVPicture *pict, enum PixelFormat pix_fmt, int width, int height, int64_t pts); typedef FrameHookProcess *FrameHookProcessFn; extern FrameHookProcess Process;
--- a/gif.c Mon Feb 10 09:35:32 2003 +0000 +++ b/gif.c Tue Feb 11 16:35:48 2003 +0000 @@ -212,7 +212,7 @@ } /* this is maybe slow, but allows for extensions */ -static inline unsigned char gif_clut_index(UINT8 r, UINT8 g, UINT8 b) +static inline unsigned char gif_clut_index(uint8_t r, uint8_t g, uint8_t b) { return ((((r)/47)%6)*6*6+(((g)/47)%6)*6+(((b)/47)%6)); } @@ -223,7 +223,7 @@ uint8_t *buf, int linesize, int pix_fmt) { PutBitContext p; - UINT8 buffer[200]; /* 100 * 9 / 8 = 113 */ + uint8_t buffer[200]; /* 100 * 9 / 8 = 113 */ int i, left, w, v; uint8_t *ptr; /* image block */ @@ -287,8 +287,8 @@ } typedef struct { - INT64 time, file_time; - UINT8 buffer[100]; /* data chunks */ + int64_t time, file_time; + uint8_t buffer[100]; /* data chunks */ } GIFContext; static int gif_write_header(AVFormatContext *s) @@ -331,12 +331,12 @@ } static int gif_write_video(AVFormatContext *s, - AVCodecContext *enc, UINT8 *buf, int size) + AVCodecContext *enc, uint8_t *buf, int size) { ByteIOContext *pb = &s->pb; GIFContext *gif = s->priv_data; int jiffies; - INT64 delay; + int64_t delay; /* graphic control extension block */ put_byte(pb, 0x21); @@ -366,7 +366,7 @@ } static int gif_write_packet(AVFormatContext *s, int stream_index, - UINT8 *buf, int size, int force_pts) + uint8_t *buf, int size, int force_pts) { AVCodecContext *codec = &s->streams[stream_index]->codec; if (codec->codec_type == CODEC_TYPE_AUDIO)
--- a/grab.c Mon Feb 10 09:35:32 2003 +0000 +++ b/grab.c Tue Feb 11 16:35:48 2003 +0000 @@ -31,11 +31,11 @@ int use_mmap; int width, height; int frame_rate; - INT64 time_frame; + int64_t time_frame; int frame_size; struct video_capability video_cap; struct video_audio audio_saved; - UINT8 *video_buf; + uint8_t *video_buf; struct video_mbuf gb_buffers; struct video_mmap gb_buf; int gb_frame; @@ -45,8 +45,8 @@ int aiw_enabled; int deint; int halfw; - UINT8 *src_mem; - UINT8 *lum_m4_mem; + uint8_t *src_mem; + uint8_t *lum_m4_mem; } VideoData; static int aiw_init(VideoData *s); @@ -252,9 +252,9 @@ return -EIO; } -static int v4l_mm_read_picture(VideoData *s, UINT8 *buf) +static int v4l_mm_read_picture(VideoData *s, uint8_t *buf) { - UINT8 *ptr; + uint8_t *ptr; /* Setup to capture the next frame */ s->gb_buf.frame = (s->gb_frame + 1) % s->gb_buffers.frames; @@ -281,9 +281,9 @@ static int grab_read_packet(AVFormatContext *s1, AVPacket *pkt) { VideoData *s = s1->priv_data; - INT64 curtime, delay; + int64_t curtime, delay; struct timespec ts; - INT64 per_frame = (INT64_C(1000000) * FRAME_RATE_BASE) / s->frame_rate; + int64_t per_frame = (int64_t_C(1000000) * FRAME_RATE_BASE) / s->frame_rate; /* Calculate the time of the next frame */ s->time_frame += per_frame; @@ -617,13 +617,13 @@ /* Read two fields separately. */ static int aiw_read_picture(VideoData *s, uint8_t *data) { - UINT8 *ptr, *lum, *cb, *cr; + uint8_t *ptr, *lum, *cb, *cr; int h; #ifndef HAVE_MMX int sum; #endif - UINT8* src = s->src_mem; - UINT8 *ptrend = &src[s->width*2]; + uint8_t* src = s->src_mem; + uint8_t *ptrend = &src[s->width*2]; lum=data; cb=&lum[s->width*s->height]; cr=&cb[(s->width*s->height)/4]; @@ -715,7 +715,7 @@ read(s->fd,src,s->width*4); } } else { - UINT8 *lum_m1, *lum_m2, *lum_m3, *lum_m4; + uint8_t *lum_m1, *lum_m2, *lum_m3, *lum_m4; #ifdef HAVE_MMX mmx_t rounder; rounder.uw[0]=4; @@ -725,7 +725,7 @@ movq_m2r(rounder,mm6); pxor_r2r(mm7,mm7); #else - UINT8 *cm = cropTbl + MAX_NEG_CROP; + uint8_t *cm = cropTbl + MAX_NEG_CROP; #endif /* read two fields and deinterlace them */
--- a/http.c Mon Feb 10 09:35:32 2003 +0000 +++ b/http.c Tue Feb 11 16:35:48 2003 +0000 @@ -48,7 +48,7 @@ } HTTPContext; static int http_connect(URLContext *h, const char *path, const char *hoststr); -static int http_write(URLContext *h, UINT8 *buf, int size); +static int http_write(URLContext *h, uint8_t *buf, int size); /* return non zero if error */ @@ -236,7 +236,7 @@ } -static int http_read(URLContext *h, UINT8 *buf, int size) +static int http_read(URLContext *h, uint8_t *buf, int size) { HTTPContext *s = h->priv_data; int size1, len; @@ -265,7 +265,7 @@ } /* used only when posting data */ -static int http_write(URLContext *h, UINT8 *buf, int size) +static int http_write(URLContext *h, uint8_t *buf, int size) { HTTPContext *s = h->priv_data; return url_write(s->hd, buf, size);
--- a/img.c Mon Feb 10 09:35:32 2003 +0000 +++ b/img.c Tue Feb 11 16:35:48 2003 +0000 @@ -157,18 +157,18 @@ char filename[1024]; int ret; ByteIOContext f1, *f; - static INT64 first_frame; // BUG -> to context FIXME + static int64_t first_frame; // BUG -> to context FIXME if (emulate_frame_rate) { if (!first_frame) { first_frame = av_gettime(); } else { - INT64 pts; - INT64 nowus; + int64_t pts; + int64_t nowus; nowus = av_gettime() - first_frame; - pts = ((INT64)s->img_number * FRAME_RATE_BASE * 1000000) / (s1->streams[0]->codec.frame_rate); + pts = ((int64_t)s->img_number * FRAME_RATE_BASE * 1000000) / (s1->streams[0]->codec.frame_rate); if (pts > nowus) usleep(pts - nowus); @@ -201,7 +201,7 @@ av_free_packet(pkt); return -EIO; /* signal EOF */ } else { - pkt->pts = ((INT64)s->img_number * s1->pts_den * FRAME_RATE_BASE) / (s1->streams[0]->codec.frame_rate * s1->pts_num); + pkt->pts = ((int64_t)s->img_number * s1->pts_den * FRAME_RATE_BASE) / (s1->streams[0]->codec.frame_rate * s1->pts_num); s->img_number++; return 0; } @@ -265,7 +265,7 @@ } static int img_write_packet(AVFormatContext *s, int stream_index, - UINT8 *buf, int size, int force_pts) + uint8_t *buf, int size, int force_pts) { VideoData *img = s->priv_data; AVStream *st = s->streams[stream_index];
--- a/jpeg.c Mon Feb 10 09:35:32 2003 +0000 +++ b/jpeg.c Tue Feb 11 16:35:48 2003 +0000 @@ -56,8 +56,8 @@ } } -static void img_copy(UINT8 *dst, int dst_wrap, - UINT8 *src, int src_wrap, +static void img_copy(uint8_t *dst, int dst_wrap, + uint8_t *src, int src_wrap, int width, int height) { for(;height > 0; height--) {
--- a/mov.c Mon Feb 10 09:35:32 2003 +0000 +++ b/mov.c Tue Feb 11 16:35:48 2003 +0000 @@ -61,7 +61,7 @@ * Avoid them. This is here just to help debugging. */ static int debug_indent = 0; -void print_atom(const char *str, UINT32 type, UINT64 offset, UINT64 size) +void print_atom(const char *str, uint32_t type, uint64_t offset, uint64_t size) { unsigned int tag, i; tag = (unsigned int) type; @@ -149,7 +149,7 @@ int is_ff_stream; /* Is this stream presented to ffmpeg ? i.e. is this an audio or video stream ? */ long next_chunk; long chunk_count; - INT64 *chunk_offsets; + int64_t *chunk_offsets; long sample_to_chunk_sz; MOV_sample_to_chunk_tbl *sample_to_chunk; long sample_to_chunk_index; @@ -170,15 +170,15 @@ long time_scale; int found_moov; /* when both 'moov' and 'mdat' sections has been found */ int found_mdat; /* we suppose we have enough data to read the file */ - INT64 mdat_size; - INT64 mdat_offset; + int64_t mdat_size; + int64_t mdat_offset; int total_streams; /* some streams listed here aren't presented to the ffmpeg API, since they aren't either video nor audio * but we need the info to be able to skip data from those streams in the 'mdat' section */ MOVStreamContext *streams[MAX_STREAMS]; - INT64 next_chunk_offset; + int64_t next_chunk_offset; int partial; /* != 0 : there is still to read in the current chunk (=id of the stream + 1) */ } MOVContext; @@ -195,18 +195,18 @@ */ typedef int (*mov_parse_function)(const struct MOVParseTableEntry *parse_table, ByteIOContext *pb, - UINT32 atom_type, - INT64 atom_offset, /* after the size and type field (and eventually the extended size) */ - INT64 atom_size, /* total size (excluding the size and type fields) */ + uint32_t atom_type, + int64_t atom_offset, /* after the size and type field (and eventually the extended size) */ + int64_t atom_size, /* total size (excluding the size and type fields) */ void *param); /* links atom IDs to parse functions */ typedef struct MOVParseTableEntry { - UINT32 type; + uint32_t type; mov_parse_function func; } MOVParseTableEntry; -static int parse_leaf(const MOVParseTableEntry *parse_table, ByteIOContext *pb, UINT32 atom_type, INT64 atom_offset, INT64 atom_size, void *param) +static int parse_leaf(const MOVParseTableEntry *parse_table, ByteIOContext *pb, uint32_t atom_type, int64_t atom_offset, int64_t atom_size, void *param) { #ifdef DEBUG print_atom("leaf", atom_type, atom_offset, atom_size); @@ -218,11 +218,11 @@ } -static int parse_default(const MOVParseTableEntry *parse_table, ByteIOContext *pb, UINT32 atom_type, INT64 atom_offset, INT64 atom_size, void *param) +static int parse_default(const MOVParseTableEntry *parse_table, ByteIOContext *pb, uint32_t atom_type, int64_t atom_offset, int64_t atom_size, void *param) { - UINT32 type, foo=0; - UINT64 offset, size; - UINT64 total_size = 0; + uint32_t type, foo=0; + uint64_t offset, size; + uint64_t total_size = 0; int i; int err = 0; foo=0; @@ -276,7 +276,7 @@ return err; } -static int parse_mvhd(const MOVParseTableEntry *parse_table, ByteIOContext *pb, UINT32 atom_type, INT64 atom_offset, INT64 atom_size, void *param) +static int parse_mvhd(const MOVParseTableEntry *parse_table, ByteIOContext *pb, uint32_t atom_type, int64_t atom_offset, int64_t atom_size, void *param) { MOVContext *c; #ifdef DEBUG @@ -314,7 +314,7 @@ } /* this atom should contain all header atoms */ -static int parse_moov(const MOVParseTableEntry *parse_table, ByteIOContext *pb, UINT32 atom_type, INT64 atom_offset, INT64 atom_size, void *param) +static int parse_moov(const MOVParseTableEntry *parse_table, ByteIOContext *pb, uint32_t atom_type, int64_t atom_offset, int64_t atom_size, void *param) { int err; MOVContext *c; @@ -333,7 +333,7 @@ } /* this atom contains actual media data */ -static int parse_mdat(const MOVParseTableEntry *parse_table, ByteIOContext *pb, UINT32 atom_type, INT64 atom_offset, INT64 atom_size, void *param) +static int parse_mdat(const MOVParseTableEntry *parse_table, ByteIOContext *pb, uint32_t atom_type, int64_t atom_offset, int64_t atom_size, void *param) { MOVContext *c; #ifdef DEBUG @@ -355,10 +355,10 @@ /* this atom should be null (from specs), but some buggy files put the 'moov' atom inside it... */ /* like the files created with Adobe Premiere 5.0, for samples see */ /* http://graphics.tudelft.nl/~wouter/publications/soundtests/ */ -static int parse_wide(const MOVParseTableEntry *parse_table, ByteIOContext *pb, UINT32 atom_type, INT64 atom_offset, INT64 atom_size, void *param) +static int parse_wide(const MOVParseTableEntry *parse_table, ByteIOContext *pb, uint32_t atom_type, int64_t atom_offset, int64_t atom_size, void *param) { int err; - UINT32 type; + uint32_t type; #ifdef DEBUG print_atom("wide", atom_type, atom_offset, atom_size); debug_indent++; @@ -381,7 +381,7 @@ return err; } -static int parse_trak(const MOVParseTableEntry *parse_table, ByteIOContext *pb, UINT32 atom_type, INT64 atom_offset, INT64 atom_size, void *param) +static int parse_trak(const MOVParseTableEntry *parse_table, ByteIOContext *pb, uint32_t atom_type, int64_t atom_offset, int64_t atom_size, void *param) { MOVContext *c; AVStream *st; @@ -401,7 +401,7 @@ return parse_default(parse_table, pb, atom_type, atom_offset, atom_size, param); } -static int parse_tkhd(const MOVParseTableEntry *parse_table, ByteIOContext *pb, UINT32 atom_type, INT64 atom_offset, INT64 atom_size, void *param) +static int parse_tkhd(const MOVParseTableEntry *parse_table, ByteIOContext *pb, uint32_t atom_type, int64_t atom_offset, int64_t atom_size, void *param) { MOVContext *c; AVStream *st; @@ -445,7 +445,7 @@ return 0; } -static int parse_mdhd(const MOVParseTableEntry *parse_table, ByteIOContext *pb, UINT32 atom_type, INT64 atom_offset, INT64 atom_size, void *param) +static int parse_mdhd(const MOVParseTableEntry *parse_table, ByteIOContext *pb, uint32_t atom_type, int64_t atom_offset, int64_t atom_size, void *param) { MOVContext *c; AVStream *st; @@ -477,14 +477,14 @@ return 0; } -static int parse_hdlr(const MOVParseTableEntry *parse_table, ByteIOContext *pb, UINT32 atom_type, INT64 atom_offset, INT64 atom_size, void *param) +static int parse_hdlr(const MOVParseTableEntry *parse_table, ByteIOContext *pb, uint32_t atom_type, int64_t atom_offset, int64_t atom_size, void *param) { MOVContext *c; int len = 0; char *buf; - UINT32 type; + uint32_t type; AVStream *st; - UINT32 ctype; + uint32_t ctype; #ifdef DEBUG print_atom("hdlr", atom_type, atom_offset, atom_size); #endif @@ -612,11 +612,11 @@ return len; } -static int parse_stsd(const MOVParseTableEntry *parse_table, ByteIOContext *pb, UINT32 atom_type, INT64 atom_offset, INT64 atom_size, void *param) +static int parse_stsd(const MOVParseTableEntry *parse_table, ByteIOContext *pb, uint32_t atom_type, int64_t atom_offset, int64_t atom_size, void *param) { MOVContext *c; int entries, size, samp_sz, frames_per_sample, id; - UINT32 format; + uint32_t format; AVStream *st; MOVStreamContext *sc; #ifdef DEBUG @@ -691,7 +691,7 @@ size -= (16+8*4+2+32+2*2); while (size >= 8) { int atom_size, atom_type; - INT64 start_pos; + int64_t start_pos; atom_size = get_be32(pb); atom_type = get_le32(pb); @@ -800,7 +800,7 @@ return 0; } -static int parse_stco(const MOVParseTableEntry *parse_table, ByteIOContext *pb, UINT32 atom_type, INT64 atom_offset, INT64 atom_size, void *param) +static int parse_stco(const MOVParseTableEntry *parse_table, ByteIOContext *pb, uint32_t atom_type, int64_t atom_offset, int64_t atom_size, void *param) { MOVContext *c; int entries, i; @@ -818,7 +818,7 @@ entries = get_be32(pb); sc->chunk_count = entries; - sc->chunk_offsets = av_malloc(entries * sizeof(INT64)); + sc->chunk_offsets = av_malloc(entries * sizeof(int64_t)); if(atom_type == MKTAG('s', 't', 'c', 'o')) { for(i=0; i<entries; i++) { sc->chunk_offsets[i] = get_be32(pb); @@ -839,7 +839,7 @@ return 0; } -static int parse_stsc(const MOVParseTableEntry *parse_table, ByteIOContext *pb, UINT32 atom_type, INT64 atom_offset, INT64 atom_size, void *param) +static int parse_stsc(const MOVParseTableEntry *parse_table, ByteIOContext *pb, uint32_t atom_type, int64_t atom_offset, int64_t atom_size, void *param) { MOVContext *c; int entries, i; @@ -872,7 +872,7 @@ return 0; } -static int parse_stsz(const MOVParseTableEntry *parse_table, ByteIOContext *pb, UINT32 atom_type, INT64 atom_offset, INT64 atom_size, void *param) +static int parse_stsz(const MOVParseTableEntry *parse_table, ByteIOContext *pb, uint32_t atom_type, int64_t atom_offset, int64_t atom_size, void *param) { MOVContext *c; int entries, i; @@ -906,7 +906,7 @@ return 0; } -static int parse_stts(const MOVParseTableEntry *parse_table, ByteIOContext *pb, UINT32 atom_type, INT64 atom_offset, INT64 atom_size, void *param) +static int parse_stts(const MOVParseTableEntry *parse_table, ByteIOContext *pb, uint32_t atom_type, int64_t atom_offset, int64_t atom_size, void *param) { MOVContext *c; int entries, i; @@ -944,12 +944,12 @@ } #ifdef CONFIG_ZLIB -static int null_read_packet(void *opaque, UINT8 *buf, int buf_size) +static int null_read_packet(void *opaque, uint8_t *buf, int buf_size) { return -1; } -static int parse_cmov(const MOVParseTableEntry *parse_table, ByteIOContext *pb, UINT32 atom_type, INT64 atom_offset, INT64 atom_size, void *param) +static int parse_cmov(const MOVParseTableEntry *parse_table, ByteIOContext *pb, uint32_t atom_type, int64_t atom_offset, int64_t atom_size, void *param) { MOVContext *c; ByteIOContext ctx; @@ -1130,7 +1130,7 @@ MOVContext *mov = s->priv_data; ByteIOContext *pb = &s->pb; int i, j, nb, err; - INT64 size; + int64_t size; mov->fc = s; #if 0 @@ -1200,7 +1200,7 @@ { MOVContext *mov = s->priv_data; MOVStreamContext *sc; - INT64 offset = 0x0FFFFFFFFFFFFFFF; + int64_t offset = 0x0FFFFFFFFFFFFFFF; int i; int st_id = 0, size; size = 0x0FFFFFFF;
--- a/mpeg.c Mon Feb 10 09:35:32 2003 +0000 +++ b/mpeg.c Tue Feb 11 16:35:48 2003 +0000 @@ -22,12 +22,12 @@ #define NB_STREAMS 2 typedef struct { - UINT8 buffer[MAX_PAYLOAD_SIZE]; + uint8_t buffer[MAX_PAYLOAD_SIZE]; int buffer_ptr; - UINT8 id; + uint8_t id; int max_buffer_size; /* in bytes */ int packet_number; - INT64 start_pts; + int64_t start_pts; } StreamInfo; typedef struct { @@ -66,7 +66,7 @@ extern AVOutputFormat mpeg2vob_mux; static int put_pack_header(AVFormatContext *ctx, - UINT8 *buf, INT64 timestamp) + uint8_t *buf, int64_t timestamp) { MpegMuxContext *s = ctx->priv_data; PutBitContext pb; @@ -79,11 +79,11 @@ } else { put_bits(&pb, 4, 0x2); } - put_bits(&pb, 3, (UINT32)((timestamp >> 30) & 0x07)); + put_bits(&pb, 3, (uint32_t)((timestamp >> 30) & 0x07)); put_bits(&pb, 1, 1); - put_bits(&pb, 15, (UINT32)((timestamp >> 15) & 0x7fff)); + put_bits(&pb, 15, (uint32_t)((timestamp >> 15) & 0x7fff)); put_bits(&pb, 1, 1); - put_bits(&pb, 15, (UINT32)((timestamp) & 0x7fff)); + put_bits(&pb, 15, (uint32_t)((timestamp) & 0x7fff)); put_bits(&pb, 1, 1); if (s->is_mpeg2) { /* clock extension */ @@ -101,7 +101,7 @@ return pbBufPtr(&pb) - pb.buf; } -static int put_system_header(AVFormatContext *ctx, UINT8 *buf) +static int put_system_header(AVFormatContext *ctx, uint8_t *buf) { MpegMuxContext *s = ctx->priv_data; int size, rate_bound, i, private_stream_coded, id; @@ -254,10 +254,10 @@ { MpegMuxContext *s = ctx->priv_data; StreamInfo *stream = ctx->streams[stream_index]->priv_data; - UINT8 *buf_ptr; + uint8_t *buf_ptr; int size, payload_size, startcode, id, len, stuffing_size, i, header_len; - INT64 timestamp; - UINT8 buffer[128]; + int64_t timestamp; + uint8_t buffer[128]; int last = last_pkt ? 4 : 0; id = stream->id; @@ -314,8 +314,8 @@ (0x02 << 4) | (((timestamp >> 30) & 0x07) << 1) | 1); - put_be16(&ctx->pb, (UINT16)((((timestamp >> 15) & 0x7fff) << 1) | 1)); - put_be16(&ctx->pb, (UINT16)((((timestamp) & 0x7fff) << 1) | 1)); + put_be16(&ctx->pb, (uint16_t)((((timestamp >> 15) & 0x7fff) << 1) | 1)); + put_be16(&ctx->pb, (uint16_t)((((timestamp) & 0x7fff) << 1) | 1)); if (startcode == PRIVATE_STREAM_1) { put_byte(&ctx->pb, id); @@ -347,7 +347,7 @@ } static int mpeg_mux_write_packet(AVFormatContext *ctx, int stream_index, - UINT8 *buf, int size, int pts) + uint8_t *buf, int size, int pts) { MpegMuxContext *s = ctx->priv_data; AVStream *st = ctx->streams[stream_index]; @@ -440,7 +440,7 @@ } MpegDemuxContext; static int find_start_code(ByteIOContext *pb, int *size_ptr, - UINT32 *header_state) + uint32_t *header_state) { unsigned int state, v; int val, n; @@ -475,18 +475,18 @@ return 0; } -static INT64 get_pts(ByteIOContext *pb, int c) +static int64_t get_pts(ByteIOContext *pb, int c) { - INT64 pts; + int64_t pts; int val; if (c < 0) c = get_byte(pb); - pts = (INT64)((c >> 1) & 0x07) << 30; + pts = (int64_t)((c >> 1) & 0x07) << 30; val = get_be16(pb); - pts |= (INT64)(val >> 1) << 15; + pts |= (int64_t)(val >> 1) << 15; val = get_be16(pb); - pts |= (INT64)(val >> 1); + pts |= (int64_t)(val >> 1); return pts; } @@ -496,7 +496,7 @@ MpegDemuxContext *m = s->priv_data; AVStream *st; int len, size, startcode, i, c, flags, header_len, type, codec_id; - INT64 pts, dts; + int64_t pts, dts; /* next start code (should be immediately after) */ redo:
--- a/mpegts.c Mon Feb 10 09:35:32 2003 +0000 +++ b/mpegts.c Tue Feb 11 16:35:48 2003 +0000 @@ -88,7 +88,7 @@ ByteIOContext *pb = &s->pb; unsigned char buf[1024]; int len; - INT64 pos; + int64_t pos; /* read the first 1024 bytes to get packet size */ pos = url_ftell(pb);
--- a/mpjpeg.c Mon Feb 10 09:35:32 2003 +0000 +++ b/mpjpeg.c Tue Feb 11 16:35:48 2003 +0000 @@ -24,7 +24,7 @@ static int mpjpeg_write_header(AVFormatContext *s) { - UINT8 buf1[256]; + uint8_t buf1[256]; snprintf(buf1, sizeof(buf1), "--%s\n", BOUNDARY_TAG); put_buffer(&s->pb, buf1, strlen(buf1)); @@ -33,9 +33,9 @@ } static int mpjpeg_write_packet(AVFormatContext *s, int stream_index, - UINT8 *buf, int size, int force_pts) + uint8_t *buf, int size, int force_pts) { - UINT8 buf1[256]; + uint8_t buf1[256]; snprintf(buf1, sizeof(buf1), "Content-type: image/jpeg\n\n"); put_buffer(&s->pb, buf1, strlen(buf1)); @@ -75,7 +75,7 @@ } static int single_jpeg_write_packet(AVFormatContext *s, int stream_index, - UINT8 *buf, int size, int force_pts) + uint8_t *buf, int size, int force_pts) { put_buffer(&s->pb, buf, size); put_flush_packet(&s->pb);
--- a/pnm.c Mon Feb 10 09:35:32 2003 +0000 +++ b/pnm.c Tue Feb 11 16:35:48 2003 +0000 @@ -161,7 +161,7 @@ { int i, h, h1, c, n, linesize; char buf[100]; - UINT8 *ptr, *ptr1, *ptr2; + uint8_t *ptr, *ptr1, *ptr2; h = info->height; h1 = h;
--- a/raw.c Mon Feb 10 09:35:32 2003 +0000 +++ b/raw.c Tue Feb 11 16:35:48 2003 +0000 @@ -38,7 +38,7 @@ } /* raw input */ -static static int raw_read_header(AVFormatContext *s, AVFormatParameters *ap) +static int raw_read_header(AVFormatContext *s, AVFormatParameters *ap) { AVStream *st; int id;
--- a/rm.c Mon Feb 10 09:35:32 2003 +0000 +++ b/rm.c Tue Feb 11 16:35:48 2003 +0000 @@ -322,16 +322,16 @@ return 0; } -static int rm_write_audio(AVFormatContext *s, UINT8 *buf, int size) +static int rm_write_audio(AVFormatContext *s, uint8_t *buf, int size) { - UINT8 *buf1; + uint8_t *buf1; RMContext *rm = s->priv_data; ByteIOContext *pb = &s->pb; StreamInfo *stream = rm->audio_stream; int i; /* XXX: suppress this malloc */ - buf1= (UINT8*) av_malloc( size * sizeof(UINT8) ); + buf1= (uint8_t*) av_malloc( size * sizeof(uint8_t) ); write_packet_header(s, stream, size, stream->enc->coded_frame->key_frame); @@ -347,7 +347,7 @@ return 0; } -static int rm_write_video(AVFormatContext *s, UINT8 *buf, int size) +static int rm_write_video(AVFormatContext *s, uint8_t *buf, int size) { RMContext *rm = s->priv_data; ByteIOContext *pb = &s->pb; @@ -388,7 +388,7 @@ } static int rm_write_packet(AVFormatContext *s, int stream_index, - UINT8 *buf, int size, int force_pts) + uint8_t *buf, int size, int force_pts) { if (s->streams[stream_index]->codec.codec_type == CODEC_TYPE_AUDIO) @@ -472,7 +472,7 @@ ByteIOContext *pb = &s->pb; unsigned int tag, v; int tag_size, size, codec_data_size, i; - INT64 codec_pos; + int64_t codec_pos; unsigned int h263_hack_version; char buf[128]; int flags = 0; @@ -650,7 +650,7 @@ ByteIOContext *pb = &s->pb; AVStream *st; int len, num, timestamp, i, tmp, j; - UINT8 *ptr; + uint8_t *ptr; int flags; redo:
--- a/rtp.c Mon Feb 10 09:35:32 2003 +0000 +++ b/rtp.c Tue Feb 11 16:35:48 2003 +0000 @@ -90,23 +90,23 @@ typedef struct RTPContext { int payload_type; - UINT32 ssrc; - UINT16 seq; - UINT32 timestamp; - UINT32 base_timestamp; - UINT32 cur_timestamp; + uint32_t ssrc; + uint16_t seq; + uint32_t timestamp; + uint32_t base_timestamp; + uint32_t cur_timestamp; int max_payload_size; /* rtcp sender statistics receive */ - INT64 last_rtcp_ntp_time; - UINT32 last_rtcp_timestamp; + int64_t last_rtcp_ntp_time; + uint32_t last_rtcp_timestamp; /* rtcp sender statistics */ unsigned int packet_count; unsigned int octet_count; unsigned int last_octet_count; int first_packet; /* buffer for output */ - UINT8 buf[RTP_MAX_PACKET_LENGTH]; - UINT8 *buf_ptr; + uint8_t buf[RTP_MAX_PACKET_LENGTH]; + uint8_t *buf_ptr; } RTPContext; int rtp_get_codec_info(AVCodecContext *codec, int payload_type) @@ -184,14 +184,14 @@ return payload_type; } -static inline UINT32 decode_be32(const UINT8 *p) +static inline uint32_t decode_be32(const uint8_t *p) { return (p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3]; } -static inline UINT32 decode_be64(const UINT8 *p) +static inline uint32_t decode_be64(const uint8_t *p) { - return ((UINT64)decode_be32(p) << 32) | decode_be32(p + 4); + return ((uint64_t)decode_be32(p) << 32) | decode_be32(p + 4); } static int rtcp_parse_packet(AVFormatContext *s1, const unsigned char *buf, int len) @@ -221,7 +221,7 @@ unsigned int ssrc, h; int payload_type, seq, delta_timestamp; AVStream *st; - UINT32 timestamp; + uint32_t timestamp; if (len < 12) return -1; @@ -390,7 +390,7 @@ } /* send an rtcp sender report packet */ -static void rtcp_send_sr(AVFormatContext *s1, INT64 ntp_time) +static void rtcp_send_sr(AVFormatContext *s1, int64_t ntp_time) { RTPContext *s = s1->priv_data; #if defined(DEBUG) @@ -409,7 +409,7 @@ /* send an rtp packet. sequence number is incremented, but the caller must update the timestamp itself */ -static void rtp_send_data(AVFormatContext *s1, UINT8 *buf1, int len) +static void rtp_send_data(AVFormatContext *s1, uint8_t *buf1, int len) { RTPContext *s = s1->priv_data; @@ -435,7 +435,7 @@ /* send an integer number of samples and compute time stamp and fill the rtp send buffer before sending. */ static void rtp_send_samples(AVFormatContext *s1, - UINT8 *buf1, int size, int sample_size) + uint8_t *buf1, int size, int sample_size) { RTPContext *s = s1->priv_data; int len, max_packet_size, n; @@ -468,7 +468,7 @@ /* NOTE: we suppose that exactly one frame is given as argument here */ /* XXX: test it */ static void rtp_send_mpegaudio(AVFormatContext *s1, - UINT8 *buf1, int size) + uint8_t *buf1, int size) { RTPContext *s = s1->priv_data; AVStream *st = s1->streams[0]; @@ -524,12 +524,12 @@ /* NOTE: a single frame must be passed with sequence header if needed. XXX: use slices. */ static void rtp_send_mpegvideo(AVFormatContext *s1, - UINT8 *buf1, int size) + uint8_t *buf1, int size) { RTPContext *s = s1->priv_data; AVStream *st = s1->streams[0]; int len, h, max_packet_size; - UINT8 *q; + uint8_t *q; max_packet_size = s->max_payload_size; @@ -572,7 +572,7 @@ } static void rtp_send_raw(AVFormatContext *s1, - UINT8 *buf1, int size) + uint8_t *buf1, int size) { RTPContext *s = s1->priv_data; AVStream *st = s1->streams[0]; @@ -599,12 +599,12 @@ /* write an RTP packet. 'buf1' must contain a single specific frame. */ static int rtp_write_packet(AVFormatContext *s1, int stream_index, - UINT8 *buf1, int size, int force_pts) + uint8_t *buf1, int size, int force_pts) { RTPContext *s = s1->priv_data; AVStream *st = s1->streams[0]; int rtcp_bytes; - INT64 ntp_time; + int64_t ntp_time; #ifdef DEBUG printf("%d: write len=%d\n", stream_index, size); @@ -615,7 +615,7 @@ RTCP_TX_RATIO_DEN; if (s->first_packet || rtcp_bytes >= 28) { /* compute NTP time */ - ntp_time = force_pts; // ((INT64)force_pts << 28) / 5625 + ntp_time = force_pts; // ((int64_t)force_pts << 28) / 5625 rtcp_send_sr(s1, ntp_time); s->last_octet_count = s->octet_count; s->first_packet = 0;
--- a/rtpproto.c Mon Feb 10 09:35:32 2003 +0000 +++ b/rtpproto.c Tue Feb 11 16:35:48 2003 +0000 @@ -171,7 +171,7 @@ return -EIO; } -static int rtp_read(URLContext *h, UINT8 *buf, int size) +static int rtp_read(URLContext *h, uint8_t *buf, int size) { RTPContext *s = h->priv_data; struct sockaddr_in from; @@ -230,7 +230,7 @@ return len; } -static int rtp_write(URLContext *h, UINT8 *buf, int size) +static int rtp_write(URLContext *h, uint8_t *buf, int size) { RTPContext *s = h->priv_data; int ret;
--- a/rtsp.h Mon Feb 10 09:35:32 2003 +0000 +++ b/rtsp.h Tue Feb 11 16:35:48 2003 +0000 @@ -41,7 +41,7 @@ int client_port_min, client_port_max; /* RTP ports */ int server_port_min, server_port_max; /* RTP ports */ int ttl; /* ttl value */ - UINT32 destination; /* destination IP address */ + uint32_t destination; /* destination IP address */ enum RTSPProtocol protocol; } RTSPTransportField; @@ -63,7 +63,7 @@ }; typedef struct RTSPActionServerSetup { - UINT32 ipaddr; + uint32_t ipaddr; char transport_option[512]; } RTSPActionServerSetup;
--- a/swf.c Mon Feb 10 09:35:32 2003 +0000 +++ b/swf.c Tue Feb 11 16:35:48 2003 +0000 @@ -107,7 +107,7 @@ int xmin, int xmax, int ymin, int ymax) { PutBitContext p; - UINT8 buf[256]; + uint8_t buf[256]; int nbits, mask; init_put_bits(&p, buf, sizeof(buf), NULL, NULL); @@ -164,7 +164,7 @@ int a, int b, int c, int d, int tx, int ty) { PutBitContext p; - UINT8 buf[256]; + uint8_t buf[256]; init_put_bits(&p, buf, sizeof(buf), NULL, NULL); @@ -193,7 +193,7 @@ ByteIOContext *pb = &s->pb; AVCodecContext *enc, *audio_enc, *video_enc; PutBitContext p; - UINT8 buf1[256]; + uint8_t buf1[256]; int i, width, height, rate; swf = av_malloc(sizeof(SWFContext)); @@ -230,7 +230,7 @@ put_swf_rect(pb, 0, width, 0, height); put_le16(pb, (rate * 256) / FRAME_RATE_BASE); /* frame rate */ swf->duration_pos = url_ftell(pb); - put_le16(pb, (UINT16)(DUMMY_DURATION * (INT64)rate / FRAME_RATE_BASE)); /* frame count */ + put_le16(pb, (uint16_t)(DUMMY_DURATION * (int64_t)rate / FRAME_RATE_BASE)); /* frame count */ /* define a shape with the jpeg inside */ @@ -316,7 +316,7 @@ } static int swf_write_video(AVFormatContext *s, - AVCodecContext *enc, UINT8 *buf, int size) + AVCodecContext *enc, uint8_t *buf, int size) { ByteIOContext *pb = &s->pb; static int tag_id = 0; @@ -364,7 +364,7 @@ return 0; } -static int swf_write_audio(AVFormatContext *s, UINT8 *buf, int size) +static int swf_write_audio(AVFormatContext *s, uint8_t *buf, int size) { ByteIOContext *pb = &s->pb; @@ -378,7 +378,7 @@ } static int swf_write_packet(AVFormatContext *s, int stream_index, - UINT8 *buf, int size, int force_pts) + uint8_t *buf, int size, int force_pts) { AVCodecContext *codec = &s->streams[stream_index]->codec; if (codec->codec_type == CODEC_TYPE_AUDIO)
--- a/tcp.c Mon Feb 10 09:35:32 2003 +0000 +++ b/tcp.c Tue Feb 11 16:35:48 2003 +0000 @@ -100,7 +100,7 @@ return -EIO; } -static int tcp_read(URLContext *h, UINT8 *buf, int size) +static int tcp_read(URLContext *h, uint8_t *buf, int size) { TCPContext *s = h->priv_data; int size1, len; @@ -130,7 +130,7 @@ return size1 - size; } -static int tcp_write(URLContext *h, UINT8 *buf, int size) +static int tcp_write(URLContext *h, uint8_t *buf, int size) { TCPContext *s = h->priv_data; int ret, size1;
--- a/udp.c Mon Feb 10 09:35:32 2003 +0000 +++ b/udp.c Tue Feb 11 16:35:48 2003 +0000 @@ -208,7 +208,7 @@ return -EIO; } -static int udp_read(URLContext *h, UINT8 *buf, int size) +static int udp_read(URLContext *h, uint8_t *buf, int size) { UDPContext *s = h->priv_data; struct sockaddr_in from; @@ -228,7 +228,7 @@ return len; } -static int udp_write(URLContext *h, UINT8 *buf, int size) +static int udp_write(URLContext *h, uint8_t *buf, int size) { UDPContext *s = h->priv_data; int ret;
--- a/utils.c Mon Feb 10 09:35:32 2003 +0000 +++ b/utils.c Tue Feb 11 16:35:48 2003 +0000 @@ -197,7 +197,7 @@ av_free(f->buffer); } -int fifo_size(FifoBuffer *f, UINT8 *rptr) +int fifo_size(FifoBuffer *f, uint8_t *rptr) { int size; @@ -210,9 +210,9 @@ } /* get data from the fifo (return -1 if not enough data) */ -int fifo_read(FifoBuffer *f, UINT8 *buf, int buf_size, UINT8 **rptr_ptr) +int fifo_read(FifoBuffer *f, uint8_t *buf, int buf_size, uint8_t **rptr_ptr) { - UINT8 *rptr = *rptr_ptr; + uint8_t *rptr = *rptr_ptr; int size, len; if (f->wptr >= rptr) { @@ -238,10 +238,10 @@ return 0; } -void fifo_write(FifoBuffer *f, UINT8 *buf, int size, UINT8 **wptr_ptr) +void fifo_write(FifoBuffer *f, uint8_t *buf, int size, uint8_t **wptr_ptr) { int len; - UINT8 *wptr; + uint8_t *wptr; wptr = *wptr_ptr; while (size > 0) { len = f->end - wptr; @@ -471,7 +471,7 @@ AVFrame picture; AVPacketList *pktl=NULL, **ppktl; short samples[AVCODEC_MAX_AUDIO_FRAME_SIZE / 2]; - UINT8 *ptr; + uint8_t *ptr; int min_read_size, max_read_size; /* typical mpeg ts rate is 40 Mbits. DVD rate is about 10 @@ -759,11 +759,11 @@ switch (st->codec.codec_type) { case CODEC_TYPE_AUDIO: av_frac_init(&st->pts, 0, 0, - (INT64)s->pts_num * st->codec.sample_rate); + (int64_t)s->pts_num * st->codec.sample_rate); break; case CODEC_TYPE_VIDEO: av_frac_init(&st->pts, 0, 0, - (INT64)s->pts_num * st->codec.frame_rate); + (int64_t)s->pts_num * st->codec.frame_rate); break; default: break; @@ -786,7 +786,7 @@ int size) { AVStream *st; - INT64 pts_mask; + int64_t pts_mask; int ret, frame_size; st = s->streams[stream_index]; @@ -816,11 +816,11 @@ frame_size = st->codec.frame_size; } av_frac_add(&st->pts, - (INT64)s->pts_den * frame_size); + (int64_t)s->pts_den * frame_size); break; case CODEC_TYPE_VIDEO: av_frac_add(&st->pts, - (INT64)s->pts_den * FRAME_RATE_BASE); + (int64_t)s->pts_den * FRAME_RATE_BASE); break; default: break; @@ -914,16 +914,16 @@ return 0; } -INT64 av_gettime(void) +int64_t av_gettime(void) { #ifdef CONFIG_WIN32 struct _timeb tb; _ftime(&tb); - return ((INT64)tb.time * INT64_C(1000) + (INT64)tb.millitm) * INT64_C(1000); + return ((int64_t)tb.time * int64_t_C(1000) + (int64_t)tb.millitm) * int64_t_C(1000); #else struct timeval tv; gettimeofday(&tv,NULL); - return (INT64)tv.tv_sec * 1000000 + tv.tv_usec; + return (int64_t)tv.tv_sec * 1000000 + tv.tv_usec; #endif } @@ -955,10 +955,10 @@ * HH[:MM[:SS[.m...]]] * S+[.m...] */ -INT64 parse_date(const char *datestr, int duration) +int64_t parse_date(const char *datestr, int duration) { const char *p; - INT64 t; + int64_t t; struct tm dt; int i; static const char *date_fmt[] = { @@ -1027,7 +1027,7 @@ if (duration) return 0; else - return now * INT64_C(1000000); + return now * int64_t_C(1000000); } if (duration) { @@ -1167,7 +1167,7 @@ * @param buf buffer * @param size buffer size */ -void av_hex_dump(UINT8 *buf, int size) +void av_hex_dump(uint8_t *buf, int size) { int len, i, j, c; @@ -1271,7 +1271,7 @@ * @param num must be >= 0 * @param den must be >= 1 */ -void av_frac_init(AVFrac *f, INT64 val, INT64 num, INT64 den) +void av_frac_init(AVFrac *f, int64_t val, int64_t num, int64_t den) { num += (den >> 1); if (num >= den) { @@ -1284,7 +1284,7 @@ } /* set f to (val + 0.5) */ -void av_frac_set(AVFrac *f, INT64 val) +void av_frac_set(AVFrac *f, int64_t val) { f->val = val; f->num = f->den >> 1; @@ -1296,9 +1296,9 @@ * @param f fractional number * @param incr increment, can be positive or negative */ -void av_frac_add(AVFrac *f, INT64 incr) +void av_frac_add(AVFrac *f, int64_t incr) { - INT64 num, den; + int64_t num, den; num = f->num + incr; den = f->den;
--- a/wav.c Mon Feb 10 09:35:32 2003 +0000 +++ b/wav.c Tue Feb 11 16:35:48 2003 +0000 @@ -171,7 +171,7 @@ } static int wav_write_packet(AVFormatContext *s, int stream_index_ptr, - UINT8 *buf, int size, int force_pts) + uint8_t *buf, int size, int force_pts) { ByteIOContext *pb = &s->pb; put_buffer(pb, buf, size); @@ -190,7 +190,7 @@ /* update file size */ file_size = url_ftell(pb); url_fseek(pb, 4, SEEK_SET); - put_le32(pb, (UINT32)(file_size - 8)); + put_le32(pb, (uint32_t)(file_size - 8)); url_fseek(pb, file_size, SEEK_SET); put_flush_packet(pb); @@ -200,7 +200,7 @@ /* return the size of the found tag */ /* XXX: > 2GB ? */ -static int find_tag(ByteIOContext *pb, UINT32 tag1) +static int find_tag(ByteIOContext *pb, uint32_t tag1) { unsigned int tag; int size;
--- a/yuv.c Mon Feb 10 09:35:32 2003 +0000 +++ b/yuv.c Tue Feb 11 16:35:48 2003 +0000 @@ -97,7 +97,7 @@ ByteIOContext pb1, *pb; char fname[1024], *p; int i, j, width, height; - UINT8 *ptr; + uint8_t *ptr; URLContext *h; static const char *ext = "YUV";
--- a/yuv4mpeg.c Mon Feb 10 09:35:32 2003 +0000 +++ b/yuv4mpeg.c Tue Feb 11 16:35:48 2003 +0000 @@ -101,7 +101,7 @@ } static int yuv4_write_packet(AVFormatContext *s, int stream_index, - UINT8 *buf, int size, int force_pts) + uint8_t *buf, int size, int force_pts) { AVStream *st = s->streams[stream_index]; ByteIOContext *pb = &s->pb; @@ -109,7 +109,7 @@ int width, height; int i, m; char buf1[20]; - UINT8 *ptr, *ptr1, *ptr2; + uint8_t *ptr, *ptr1, *ptr2; picture = (AVPicture *)buf;