Mercurial > libavformat.hg
changeset 683:095009fc2f35 libavformat
kill warnings patch by (Mns Rullgrd <mru inprovide com>)
author | michael |
---|---|
date | Thu, 24 Feb 2005 19:08:50 +0000 |
parents | decfffe703bc |
children | d7c7f7bbdf55 |
files | ffm.c flvdec.c http.c img2.c mov.c movenc.c mpeg.c nsvdec.c nut.c psxstr.c tcp.c udp.c utils.c |
diffstat | 13 files changed, 33 insertions(+), 42 deletions(-) [+] |
line wrap: on
line diff
--- a/ffm.c Thu Feb 24 15:18:02 2005 +0000 +++ b/ffm.c Thu Feb 24 19:08:50 2005 +0000 @@ -261,7 +261,6 @@ { ByteIOContext *pb = &s->pb; FFMContext *ffm = s->priv_data; - int i; /* flush packets */ if (ffm->packet_ptr > ffm->packet)
--- a/flvdec.c Thu Feb 24 15:18:02 2005 +0000 +++ b/flvdec.c Thu Feb 24 19:08:50 2005 +0000 @@ -44,7 +44,6 @@ AVFormatParameters *ap) { int offset, flags; - AVStream *st; s->ctx_flags |= AVFMTCTX_NOHEADER; //ok we have a header but theres no fps, codec type, sample_rate, ...
--- a/http.c Thu Feb 24 15:18:02 2005 +0000 +++ b/http.c Thu Feb 24 19:08:50 2005 +0000 @@ -49,7 +49,7 @@ static int http_connect(URLContext *h, const char *path, const char *hoststr, const char *auth); static int http_write(URLContext *h, uint8_t *buf, int size); -static char *b64_encode( unsigned char *src ); +static char *b64_encode(const unsigned char *src ); /* return non zero if error */ @@ -287,7 +287,7 @@ * b64_encode: stolen from VLC's http.c *****************************************************************************/ -static char *b64_encode( unsigned char *src ) +static char *b64_encode( const unsigned char *src ) { static const char b64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; unsigned int len= strlen(src);
--- a/img2.c Thu Feb 24 15:18:02 2005 +0000 +++ b/img2.c Thu Feb 24 19:08:50 2005 +0000 @@ -97,16 +97,6 @@ return CODEC_ID_NONE; } -static const char *av_id2str(const IdStrMap *tags, enum CodecID id) -{ - while (tags->id) { - if(tags->id == id) - return tags->str; - tags++; - } - return NULL; -} - /* return -1 if no image found */ static int find_image_range(int *pfirst_index, int *plast_index, const char *path)
--- a/mov.c Thu Feb 24 15:18:02 2005 +0000 +++ b/mov.c Thu Feb 24 19:08:50 2005 +0000 @@ -415,12 +415,12 @@ static int mov_read_ctab(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom) { - unsigned int len; - MOV_ctab_t *t; #if 1 url_fskip(pb, atom.size); // for now #else VERY VERY BROKEN, NEVER execute this, needs rewrite + unsigned int len; + MOV_ctab_t *t; c->ctab = av_realloc(c->ctab, ++c->ctab_size); t = c->ctab[c->ctab_size]; t->seed = get_be32(pb);
--- a/movenc.c Thu Feb 24 15:18:02 2005 +0000 +++ b/movenc.c Thu Feb 24 19:08:50 2005 +0000 @@ -793,6 +793,7 @@ return updateSize(pb, pos); } +#if 0 /* TODO: Not sorted out, but not necessary either */ static int mov_write_iods_tag(ByteIOContext *pb, MOVContext *mov) { @@ -806,6 +807,7 @@ put_be16(pb, 0x01ff); return 0x15; } +#endif static int mov_write_mvhd_tag(ByteIOContext *pb, MOVContext *mov) {
--- a/mpeg.c Thu Feb 24 15:18:02 2005 +0000 +++ b/mpeg.c Thu Feb 24 19:08:50 2005 +0000 @@ -530,6 +530,7 @@ } +#if 0 /* unused, remove? */ /* return the exact available payload size for the next packet for stream 'stream_index'. 'pts' and 'dts' are only used to know if timestamps are needed in the packet header. */ @@ -613,6 +614,7 @@ } return s->packet_size - buf_index; } +#endif /* Write an MPEG padding packet header. */ static void put_padding_packet(AVFormatContext *ctx, ByteIOContext *pb,int packet_bytes) @@ -979,6 +981,7 @@ s->packet_number++; } +#if 0 /* unused, remove? */ static int64_t get_vcd_scr(AVFormatContext *ctx,int stream_index,int64_t pts) { MpegMuxContext *s = ctx->priv_data; @@ -998,6 +1001,7 @@ return scr; } +#endif static int remove_decoded_packets(AVFormatContext *ctx, int64_t scr){ // MpegMuxContext *s = ctx->priv_data; @@ -1319,6 +1323,7 @@ return val; } +#if 0 /* unused, remove? */ /* XXX: optimize */ static int find_prev_start_code(ByteIOContext *pb, int *size_ptr) { @@ -1351,6 +1356,7 @@ *size_ptr = pos_start - pos; return start_code; } +#endif /* read the next PES header. Return its position in ppos (if not NULL), and its start code, pts and dts.
--- a/nsvdec.c Thu Feb 24 15:18:02 2005 +0000 +++ b/nsvdec.c Thu Feb 24 19:08:50 2005 +0000 @@ -280,16 +280,11 @@ { NSVContext *nsv = s->priv_data; ByteIOContext *pb = &s->pb; - uint32_t tag, tag1, handler; - int codec_type, stream_index, frame_period, bit_rate, scale, rate; - unsigned int file_size, size, nb_frames; + unsigned int file_size, size; int64_t duration; int strings_size; int table_entries; int table_entries_used; - int i, n; - AVStream *st; - NSVStream *ast; PRINT(("%s()\n", __FUNCTION__)); @@ -501,14 +496,7 @@ static int nsv_read_header(AVFormatContext *s, AVFormatParameters *ap) { NSVContext *nsv = s->priv_data; - ByteIOContext *pb = &s->pb; - uint32_t tag, tag1, handler; - int codec_type, stream_index, frame_period, bit_rate, scale, rate; - unsigned int size, nb_frames; - int table_entries; - int i, n, err; - AVStream *st; - NSVStream *ast; + int i, err; PRINT(("%s()\n", __FUNCTION__)); PRINT(("filename '%s'\n", s->filename)); @@ -543,7 +531,6 @@ AVStream *st[2] = {NULL, NULL}; NSVStream *nst; AVPacket *pkt; - uint32_t v = 0; int i, err = 0; uint8_t auxcount; /* number of aux metadata, also 4 bits of vsize */ uint32_t vsize; @@ -667,7 +654,6 @@ static int nsv_read_packet(AVFormatContext *s, AVPacket *pkt) { NSVContext *nsv = s->priv_data; - ByteIOContext *pb = &s->pb; int i, err = 0; PRINT(("%s()\n", __FUNCTION__)); @@ -695,18 +681,20 @@ static int nsv_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags) { +#if 0 NSVContext *avi = s->priv_data; AVStream *st; NSVStream *ast; int frame_number, i; int64_t pos; +#endif return -1; } static int nsv_read_close(AVFormatContext *s) { - int i; +/* int i; */ NSVContext *nsv = s->priv_data; if (nsv->index_entries)
--- a/nut.c Thu Feb 24 15:18:02 2005 +0000 +++ b/nut.c Thu Feb 24 19:08:50 2005 +0000 @@ -1051,7 +1051,7 @@ } if(!strcmp(type, "v")){ - int value= get_v(bc); + get_v(bc); }else{ if(!strcmp(name, "Author")) get_str(bc, s->author, sizeof(s->author));
--- a/psxstr.c Thu Feb 24 15:18:02 2005 +0000 +++ b/psxstr.c Thu Feb 24 19:08:50 2005 +0000 @@ -107,6 +107,7 @@ return 50; } +#if 0 static void dump(unsigned char *buf,size_t len) { int i; @@ -117,6 +118,7 @@ } av_log(NULL, AV_LOG_DEBUG, "\n"); } +#endif static int str_read_header(AVFormatContext *s, AVFormatParameters *ap)
--- a/tcp.c Thu Feb 24 15:18:02 2005 +0000 +++ b/tcp.c Thu Feb 24 19:08:50 2005 +0000 @@ -57,8 +57,7 @@ struct sockaddr_in dest_addr; char hostname[1024], *q; int port, fd = -1; - TCPContext *s; - const char *p; + TCPContext *s = NULL; fd_set wfds; int fd_max, ret; struct timeval tv;
--- a/udp.c Thu Feb 24 15:18:02 2005 +0000 +++ b/udp.c Thu Feb 24 19:08:50 2005 +0000 @@ -160,14 +160,14 @@ socklen_t addrlen; char sbuf[NI_MAXSERV]; char hbuf[NI_MAXHOST]; - struct addrinfo *res0; + struct addrinfo *res0 = NULL; int family; if (s->local_port != 0) { res0 = udp_ipv6_resolve_host(0, s->local_port, SOCK_DGRAM, AF_UNSPEC, AI_PASSIVE); - if (res0 == 0) return -1; + if (res0 == 0) + goto fail; family = res0->ai_family; - freeaddrinfo(res0); } else { family = s->dest_addr.ss_family; } @@ -183,6 +183,8 @@ perror("bind"); goto fail; } + freeaddrinfo(res0); + res0 = NULL; } addrlen = sizeof(clientaddr); @@ -207,6 +209,8 @@ #else close(udp_fd); #endif + if(res0) + freeaddrinfo(res0); return -1; } @@ -274,13 +278,16 @@ /* return non zero if error */ static int udp_open(URLContext *h, const char *uri, int flags) { - struct sockaddr_in my_addr, my_addr1; char hostname[1024]; int port, udp_fd = -1, tmp; UDPContext *s = NULL; - int is_output, len; + int is_output; const char *p; char buf[256]; +#ifndef CONFIG_IPV6 + struct sockaddr_in my_addr, my_addr1; + int len; +#endif h->is_streamed = 1; h->max_packet_size = 1472;