# HG changeset patch # User kabi # Date 1044869732 0 # Node ID b0e0eb595e298bf531afaf1ffbc07a3e2dfd64f5 # Parent 8329ba7cbd018f0aadb296d4ea6b1e7fefd6858c * static,const,compiler warning cleanup diff -r 8329ba7cbd01 -r b0e0eb595e29 avformat.h --- a/avformat.h Sun Feb 09 18:07:16 2003 +0000 +++ b/avformat.h Mon Feb 10 09:35:32 2003 +0000 @@ -68,7 +68,7 @@ /* this structure contains the data a format has to probe a file */ typedef struct AVProbeData { - char *filename; + const char *filename; unsigned char *buf; int buf_size; } AVProbeData; diff -r 8329ba7cbd01 -r b0e0eb595e29 aviobuf.c --- a/aviobuf.c Sun Feb 09 18:07:16 2003 +0000 +++ b/aviobuf.c Mon Feb 10 09:35:32 2003 +0000 @@ -17,6 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "avformat.h" +#include "avio.h" #include #define IO_BUFFER_SIZE 32768 @@ -381,19 +382,19 @@ /* link with avio functions */ -void url_write_packet(void *opaque, UINT8 *buf, int buf_size) +static void url_write_packet(void *opaque, UINT8 *buf, int buf_size) { URLContext *h = opaque; url_write(h, buf, buf_size); } -int url_read_packet(void *opaque, UINT8 *buf, int buf_size) +static int url_read_packet(void *opaque, UINT8 *buf, int buf_size) { URLContext *h = opaque; return url_read(h, buf, buf_size); } -int url_seek_packet(void *opaque, INT64 offset, int whence) +static int url_seek_packet(void *opaque, INT64 offset, int whence) { URLContext *h = opaque; url_seek(h, offset, whence); diff -r 8329ba7cbd01 -r b0e0eb595e29 cutils.c --- a/cutils.c Sun Feb 09 18:07:16 2003 +0000 +++ b/cutils.c Mon Feb 10 09:35:32 2003 +0000 @@ -60,7 +60,7 @@ p = str; q = val; while (*q != '\0') { - if (toupper(*(unsigned char *)p) != toupper(*(unsigned char *)q)) + if (toupper(*(const unsigned char *)p) != toupper(*(const unsigned char *)q)) return 0; p++; q++; diff -r 8329ba7cbd01 -r b0e0eb595e29 framehook.c --- a/framehook.c Sun Feb 09 18:07:16 2003 +0000 +++ b/framehook.c Mon Feb 10 09:35:32 2003 +0000 @@ -103,7 +103,7 @@ } } -void frame_hook_release() +void frame_hook_release(void) { FrameHookEntry *fhe; FrameHookEntry *fhenext; diff -r 8329ba7cbd01 -r b0e0eb595e29 img.c --- a/img.c Sun Feb 09 18:07:16 2003 +0000 +++ b/img.c Mon Feb 10 09:35:32 2003 +0000 @@ -157,7 +157,7 @@ char filename[1024]; int ret; ByteIOContext f1, *f; - static INT64 first_frame; + static INT64 first_frame; // BUG -> to context FIXME if (emulate_frame_rate) { if (!first_frame) { diff -r 8329ba7cbd01 -r b0e0eb595e29 raw.c --- a/raw.c Sun Feb 09 18:07:16 2003 +0000 +++ b/raw.c Mon Feb 10 09:35:32 2003 +0000 @@ -19,28 +19,26 @@ #include "avformat.h" /* simple formats */ -int raw_write_header(struct AVFormatContext *s) +static int raw_write_header(struct AVFormatContext *s) { return 0; } -int raw_write_packet(struct AVFormatContext *s, - int stream_index, - unsigned char *buf, int size, int force_pts) +static int raw_write_packet(struct AVFormatContext *s, int stream_index, + unsigned char *buf, int size, int force_pts) { put_buffer(&s->pb, buf, size); put_flush_packet(&s->pb); return 0; } -int raw_write_trailer(struct AVFormatContext *s) +static int raw_write_trailer(struct AVFormatContext *s) { return 0; } /* raw input */ -static int raw_read_header(AVFormatContext *s, - AVFormatParameters *ap) +static static int raw_read_header(AVFormatContext *s, AVFormatParameters *ap) { AVStream *st; int id; @@ -78,8 +76,7 @@ #define RAW_PACKET_SIZE 1024 -int raw_read_packet(AVFormatContext *s, - AVPacket *pkt) +static int raw_read_packet(AVFormatContext *s, AVPacket *pkt) { int ret, size; // AVStream *st = s->streams[0]; @@ -101,7 +98,7 @@ return ret; } -int raw_read_close(AVFormatContext *s) +static int raw_read_close(AVFormatContext *s) { return 0; } @@ -390,8 +387,7 @@ PCMDEF(alaw, "pcm A law format", "al", CODEC_ID_PCM_ALAW) -int rawvideo_read_packet(AVFormatContext *s, - AVPacket *pkt) +static int rawvideo_read_packet(AVFormatContext *s, AVPacket *pkt) { int packet_size, ret, width, height; AVStream *st = s->streams[0]; diff -r 8329ba7cbd01 -r b0e0eb595e29 rtpproto.c --- a/rtpproto.c Sun Feb 09 18:07:16 2003 +0000 +++ b/rtpproto.c Mon Feb 10 09:35:32 2003 +0000 @@ -71,7 +71,7 @@ /* add option to url of the form: "http://host:port/path?option1=val1&option2=val2... */ -void url_add_option(char *buf, int buf_size, const char *fmt, ...) +static void url_add_option(char *buf, int buf_size, const char *fmt, ...) { char buf1[1024]; va_list ap; @@ -86,9 +86,9 @@ va_end(ap); } -void build_udp_url(char *buf, int buf_size, - const char *hostname, int port, - int local_port, int multicast, int ttl) +static void build_udp_url(char *buf, int buf_size, + const char *hostname, int port, + int local_port, int multicast, int ttl) { snprintf(buf, buf_size, "udp://%s:%d", hostname, port); if (local_port >= 0) diff -r 8329ba7cbd01 -r b0e0eb595e29 rtsp.c --- a/rtsp.c Sun Feb 09 18:07:16 2003 +0000 +++ b/rtsp.c Mon Feb 10 09:35:32 2003 +0000 @@ -345,7 +345,7 @@ } } -int sdp_parse(AVFormatContext *s, const char *content) +static int sdp_parse(AVFormatContext *s, const char *content) { const char *p; int letter; diff -r 8329ba7cbd01 -r b0e0eb595e29 utils.c --- a/utils.c Sun Feb 09 18:07:16 2003 +0000 +++ b/utils.c Mon Feb 10 09:35:32 2003 +0000 @@ -1376,7 +1376,7 @@ int ret; if (!fmt) { - pd->filename = (char *)filename; + pd->filename = filename; pd->buf = buf; pos = url_ftell(pb); pd->buf_size = get_buffer(pb, buf, PROBE_BUF_SIZE);