diff options
author | Måns Rullgård <mans@mansr.com> | 2006-09-27 19:47:39 +0000 |
---|---|---|
committer | Måns Rullgård <mans@mansr.com> | 2006-09-27 19:47:39 +0000 |
commit | 191e8ca75279073699e0c0f25128b2b2088d1cbb (patch) | |
tree | 7c9089d9008566884d42bad2f3294eb318a0e5d9 /libavformat | |
parent | d80f243ae996ced4bce81b12ada3af7803ce36f0 (diff) | |
download | ffmpeg-191e8ca75279073699e0c0f25128b2b2088d1cbb.tar.gz |
fix some signedness warnings
Originally committed as revision 6355 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/amr.c | 4 | ||||
-rw-r--r-- | libavformat/asf.c | 2 | ||||
-rw-r--r-- | libavformat/avformat.h | 2 | ||||
-rw-r--r-- | libavformat/avienc.c | 9 | ||||
-rw-r--r-- | libavformat/matroska.c | 2 | ||||
-rw-r--r-- | libavformat/mpeg.c | 4 | ||||
-rw-r--r-- | libavformat/ogg2.c | 2 | ||||
-rw-r--r-- | libavformat/ogg2.h | 4 | ||||
-rw-r--r-- | libavformat/oggparsevorbis.c | 2 | ||||
-rw-r--r-- | libavformat/rtp.c | 2 | ||||
-rw-r--r-- | libavformat/rtpproto.c | 3 | ||||
-rw-r--r-- | libavformat/udp.c | 3 |
12 files changed, 20 insertions, 19 deletions
diff --git a/libavformat/amr.c b/libavformat/amr.c index bac9fbe44f..114a73929f 100644 --- a/libavformat/amr.c +++ b/libavformat/amr.c @@ -25,8 +25,8 @@ Only mono files are supported. */ #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 --git a/libavformat/asf.c b/libavformat/asf.c index 000308576c..7759927f61 100644 --- a/libavformat/asf.c +++ b/libavformat/asf.c @@ -705,7 +705,7 @@ static int asf_read_packet(AVFormatContext *s, AVPacket *pkt) /* 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 --git a/libavformat/avformat.h b/libavformat/avformat.h index 102dc92aaf..1de22938f1 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -281,7 +281,7 @@ typedef struct AVStream { 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 --git a/libavformat/avienc.c b/libavformat/avienc.c index d8e9dde87e..83201d3fbb 100644 --- a/libavformat/avienc.c +++ b/libavformat/avienc.c @@ -73,8 +73,7 @@ static offset_t avi_start_new_riff(AVIContext *avi, ByteIOContext *pb, 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 @@ static int avi_write_ix(AVFormatContext *s) { 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 @@ static int avi_write_idx1(AVFormatContext *s) 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 --git a/libavformat/matroska.c b/libavformat/matroska.c index d22e85f2c2..c682483694 100644 --- a/libavformat/matroska.c +++ b/libavformat/matroska.c @@ -1667,7 +1667,7 @@ matroska_parse_index (MatroskaDemuxContext *matroska) 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 --git a/libavformat/mpeg.c b/libavformat/mpeg.c index 7b965babe5..d5d1641b95 100644 --- a/libavformat/mpeg.c +++ b/libavformat/mpeg.c @@ -1308,7 +1308,7 @@ static int mpegps_probe(AVProbeData *p) typedef struct MpegDemuxContext { - int header_state; + int32_t header_state; unsigned char psm_es_type[256]; } MpegDemuxContext; @@ -1339,7 +1339,7 @@ static int64_t get_pts(ByteIOContext *pb, int c) } 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 --git a/libavformat/ogg2.c b/libavformat/ogg2.c index 7f2b358c37..9e6e1539b6 100644 --- a/libavformat/ogg2.c +++ b/libavformat/ogg2.c @@ -235,7 +235,7 @@ ogg_read_page (AVFormatContext * s, int *str) 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 --git a/libavformat/ogg2.h b/libavformat/ogg2.h index b736a0a41b..dd6f24aab6 100644 --- a/libavformat/ogg2.h +++ b/libavformat/ogg2.h @@ -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_video_codec; 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 --git a/libavformat/oggparsevorbis.c b/libavformat/oggparsevorbis.c index 9eddeff09c..5de221cb4d 100644 --- a/libavformat/oggparsevorbis.c +++ b/libavformat/oggparsevorbis.c @@ -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 --git a/libavformat/rtp.c b/libavformat/rtp.c index f358f59c68..3501846cb0 100644 --- a/libavformat/rtp.c +++ b/libavformat/rtp.c @@ -495,7 +495,7 @@ int rtp_parse_packet(RTPDemuxContext *s, AVPacket *pkt, 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 --git a/libavformat/rtpproto.c b/libavformat/rtpproto.c index 9edd20f04c..731467f012 100644 --- a/libavformat/rtpproto.c +++ b/libavformat/rtpproto.c @@ -175,7 +175,8 @@ static int rtp_read(URLContext *h, uint8_t *buf, int size) { 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 --git a/libavformat/udp.c b/libavformat/udp.c index fb72096db5..6ee84e260f 100644 --- a/libavformat/udp.c +++ b/libavformat/udp.c @@ -428,7 +428,8 @@ static int udp_read(URLContext *h, uint8_t *buf, int size) #else struct sockaddr_storage from; #endif - int from_len, len; + socklen_t from_len; + int len; for(;;) { from_len = sizeof(from); |