Mercurial > libavformat.hg
changeset 1332:7474cc6383d4 libavformat
fix some signedness warnings
author | mru |
---|---|
date | Wed, 27 Sep 2006 19:47:39 +0000 |
parents | d5d90b6f384c |
children | a95c384900ab |
files | amr.c asf.c avformat.h avienc.c matroska.c mpeg.c ogg2.c ogg2.h oggparsevorbis.c rtp.c rtpproto.c udp.c |
diffstat | 12 files changed, 20 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/amr.c Wed Sep 27 19:39:41 2006 +0000 +++ b/amr.c Wed Sep 27 19:47:39 2006 +0000 @@ -25,8 +25,8 @@ */ #include "avformat.h" -static const unsigned char AMR_header [] = "#!AMR\n"; -static const unsigned char AMRWB_header [] = "#!AMR-WB\n"; +static const char AMR_header [] = "#!AMR\n"; +static const char AMRWB_header [] = "#!AMR-WB\n"; #ifdef CONFIG_MUXERS static int amr_write_header(AVFormatContext *s)
--- a/asf.c Wed Sep 27 19:39:41 2006 +0000 +++ b/asf.c Wed Sep 27 19:47:39 2006 +0000 @@ -705,7 +705,7 @@ /* return packet */ if (asf_st->ds_span > 1) { /* packet descrambling */ - char* newdata = av_malloc(asf_st->pkt.size); + uint8_t *newdata = av_malloc(asf_st->pkt.size); if (newdata) { int offset = 0; while (offset < asf_st->pkt.size) {
--- a/avformat.h Wed Sep 27 19:39:41 2006 +0000 +++ b/avformat.h Wed Sep 27 19:47:39 2006 +0000 @@ -281,7 +281,7 @@ AVIndexEntry *index_entries; /* only used if the format does not support seeking natively */ int nb_index_entries; - int index_entries_allocated_size; + unsigned int index_entries_allocated_size; int64_t nb_frames; ///< number of frames in this stream if known or 0
--- a/avienc.c Wed Sep 27 19:39:41 2006 +0000 +++ b/avienc.c Wed Sep 27 19:47:39 2006 +0000 @@ -73,8 +73,7 @@ return loff; } -static unsigned char* avi_stream2fourcc(unsigned char* tag, int index, - enum CodecType type) +static char* avi_stream2fourcc(char* tag, int index, enum CodecType type) { tag[0] = '0'; tag[1] = '0' + index; @@ -338,8 +337,8 @@ { ByteIOContext *pb = &s->pb; AVIContext *avi = s->priv_data; - unsigned char tag[5]; - unsigned char ix_tag[] = "ix00"; + char tag[5]; + char ix_tag[] = "ix00"; int i, j; assert(!url_is_streamed(pb)); @@ -397,7 +396,7 @@ AVIContext *avi = s->priv_data; offset_t idx_chunk; int i; - unsigned char tag[5]; + char tag[5]; if (!url_is_streamed(pb)) { AVIIentry* ie = 0, *tie;
--- a/matroska.c Wed Sep 27 19:39:41 2006 +0000 +++ b/matroska.c Wed Sep 27 19:47:39 2006 +0000 @@ -1667,7 +1667,7 @@ switch (id) { /* one single index entry ('point') */ case MATROSKA_ID_CUETIME: { - int64_t time; + uint64_t time; if ((res = ebml_read_uint(matroska, &id, &time)) < 0) break;
--- a/mpeg.c Wed Sep 27 19:39:41 2006 +0000 +++ b/mpeg.c Wed Sep 27 19:47:39 2006 +0000 @@ -1308,7 +1308,7 @@ typedef struct MpegDemuxContext { - int header_state; + int32_t header_state; unsigned char psm_es_type[256]; } MpegDemuxContext; @@ -1339,7 +1339,7 @@ } static int find_next_start_code(ByteIOContext *pb, int *size_ptr, - uint32_t *header_state) + int32_t *header_state) { unsigned int state, v; int val, n;
--- a/ogg2.c Wed Sep 27 19:39:41 2006 +0000 +++ b/ogg2.c Wed Sep 27 19:47:39 2006 +0000 @@ -235,7 +235,7 @@ uint32_t seq; uint32_t crc; int size, idx; - char sync[4]; + uint8_t sync[4]; int sp = 0; if (get_buffer (bc, sync, 4) < 4)
--- a/ogg2.h Wed Sep 27 19:39:41 2006 +0000 +++ b/ogg2.h Wed Sep 27 19:47:39 2006 +0000 @@ -28,7 +28,7 @@ #include "avformat.h" typedef struct ogg_codec { - uint8_t *magic; + int8_t *magic; uint8_t magicsize; int8_t *name; int (*header)(AVFormatContext *, int); @@ -80,6 +80,6 @@ extern ogg_codec_t ogm_audio_codec; extern ogg_codec_t ogm_old_codec; -extern int vorbis_comment(AVFormatContext *ms, char *buf, int size); +extern int vorbis_comment(AVFormatContext *ms, uint8_t *buf, int size); #endif
--- a/oggparsevorbis.c Wed Sep 27 19:39:41 2006 +0000 +++ b/oggparsevorbis.c Wed Sep 27 19:47:39 2006 +0000 @@ -29,7 +29,7 @@ #include "ogg2.h" extern int -vorbis_comment (AVFormatContext * as, char *buf, int size) +vorbis_comment (AVFormatContext * as, uint8_t *buf, int size) { char *p = buf; int s, n, j;
--- a/rtp.c Wed Sep 27 19:39:41 2006 +0000 +++ b/rtp.c Wed Sep 27 19:47:39 2006 +0000 @@ -495,7 +495,7 @@ len -= infos->au_headers[0].size; } s->read_buf_size = len; - s->buf_ptr = (char *)buf; + s->buf_ptr = buf; pkt->stream_index = s->st->index; return 0; default: