# HG changeset patch # User mru # Date 1159386459 0 # Node ID 7474cc6383d4af11a1ba4bf63bf55bef32e17f31 # Parent d5d90b6f384cb356178b19c56a4e1782faea6b94 fix some signedness warnings diff -r d5d90b6f384c -r 7474cc6383d4 amr.c --- 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) diff -r d5d90b6f384c -r 7474cc6383d4 asf.c --- 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) { diff -r d5d90b6f384c -r 7474cc6383d4 avformat.h --- 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 diff -r d5d90b6f384c -r 7474cc6383d4 avienc.c --- 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; diff -r d5d90b6f384c -r 7474cc6383d4 matroska.c --- 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; diff -r d5d90b6f384c -r 7474cc6383d4 mpeg.c --- 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; diff -r d5d90b6f384c -r 7474cc6383d4 ogg2.c --- 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) diff -r d5d90b6f384c -r 7474cc6383d4 ogg2.h --- 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 diff -r d5d90b6f384c -r 7474cc6383d4 oggparsevorbis.c --- 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; diff -r d5d90b6f384c -r 7474cc6383d4 rtp.c --- 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: diff -r d5d90b6f384c -r 7474cc6383d4 rtpproto.c --- a/rtpproto.c Wed Sep 27 19:39:41 2006 +0000 +++ b/rtpproto.c Wed Sep 27 19:47:39 2006 +0000 @@ -175,7 +175,8 @@ { RTPContext *s = h->priv_data; struct sockaddr_in from; - int from_len, len, fd_max, n; + socklen_t from_len; + int len, fd_max, n; fd_set rfds; #if 0 for(;;) { diff -r d5d90b6f384c -r 7474cc6383d4 udp.c --- a/udp.c Wed Sep 27 19:39:41 2006 +0000 +++ b/udp.c Wed Sep 27 19:47:39 2006 +0000 @@ -428,7 +428,8 @@ #else struct sockaddr_storage from; #endif - int from_len, len; + socklen_t from_len; + int len; for(;;) { from_len = sizeof(from);