diff options
author | Zdenek Kabelac <kabi@informatics.muni.cz> | 2003-02-10 09:35:32 +0000 |
---|---|---|
committer | Zdenek Kabelac <kabi@informatics.muni.cz> | 2003-02-10 09:35:32 +0000 |
commit | 5c91a6755b6412c918e20ff4735ca30f38a12569 (patch) | |
tree | 054521cdfc6d752e89883ef3fcfc05d6c31fd94c /libavformat | |
parent | cd66005ddaebba2d6cb3b4eae75f70ae2446b204 (diff) | |
download | ffmpeg-5c91a6755b6412c918e20ff4735ca30f38a12569.tar.gz |
* static,const,compiler warning cleanup
Originally committed as revision 1567 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/avformat.h | 2 | ||||
-rw-r--r-- | libavformat/aviobuf.c | 7 | ||||
-rw-r--r-- | libavformat/cutils.c | 2 | ||||
-rw-r--r-- | libavformat/framehook.c | 2 | ||||
-rw-r--r-- | libavformat/img.c | 2 | ||||
-rw-r--r-- | libavformat/raw.c | 20 | ||||
-rw-r--r-- | libavformat/rtpproto.c | 8 | ||||
-rw-r--r-- | libavformat/rtsp.c | 2 | ||||
-rw-r--r-- | libavformat/utils.c | 2 |
9 files changed, 22 insertions, 25 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h index c27b81df7f..b9589c8e1c 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -68,7 +68,7 @@ struct AVFormatContext; /* 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 --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c index 2e931bd849..2a62286865 100644 --- a/libavformat/aviobuf.c +++ b/libavformat/aviobuf.c @@ -17,6 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "avformat.h" +#include "avio.h" #include <stdarg.h> #define IO_BUFFER_SIZE 32768 @@ -381,19 +382,19 @@ UINT64 get_be64(ByteIOContext *s) /* 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 --git a/libavformat/cutils.c b/libavformat/cutils.c index ce2c845226..3e46533c6b 100644 --- a/libavformat/cutils.c +++ b/libavformat/cutils.c @@ -60,7 +60,7 @@ int stristart(const char *str, const char *val, const char **ptr) 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 --git a/libavformat/framehook.c b/libavformat/framehook.c index e0597f00c1..b35c970ab5 100644 --- a/libavformat/framehook.c +++ b/libavformat/framehook.c @@ -103,7 +103,7 @@ void frame_hook_process(AVPicture *pict, enum PixelFormat pix_fmt, int width, in } } -void frame_hook_release() +void frame_hook_release(void) { FrameHookEntry *fhe; FrameHookEntry *fhenext; diff --git a/libavformat/img.c b/libavformat/img.c index f5c45f2c63..0571c7ed5e 100644 --- a/libavformat/img.c +++ b/libavformat/img.c @@ -157,7 +157,7 @@ static int img_read_packet(AVFormatContext *s1, AVPacket *pkt) 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 --git a/libavformat/raw.c b/libavformat/raw.c index 4fb25b7e03..f05305aa7e 100644 --- a/libavformat/raw.c +++ b/libavformat/raw.c @@ -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 @@ static int raw_read_header(AVFormatContext *s, #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 @@ int raw_read_packet(AVFormatContext *s, return ret; } -int raw_read_close(AVFormatContext *s) +static int raw_read_close(AVFormatContext *s) { return 0; } @@ -390,8 +387,7 @@ PCMDEF(mulaw, "pcm mu law format", 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 --git a/libavformat/rtpproto.c b/libavformat/rtpproto.c index 41823fc829..8473a2c8b2 100644 --- a/libavformat/rtpproto.c +++ b/libavformat/rtpproto.c @@ -71,7 +71,7 @@ int rtp_set_remote_url(URLContext *h, const char *uri) /* 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 @@ void url_add_option(char *buf, int buf_size, const char *fmt, ...) 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 --git a/libavformat/rtsp.c b/libavformat/rtsp.c index c173cb89b7..e6108cc0b3 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -345,7 +345,7 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1, } } -int sdp_parse(AVFormatContext *s, const char *content) +static int sdp_parse(AVFormatContext *s, const char *content) { const char *p; int letter; diff --git a/libavformat/utils.c b/libavformat/utils.c index d295e9a3fa..2b7a46191d 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -1376,7 +1376,7 @@ int av_read_image(ByteIOContext *pb, const char *filename, 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); |