changeset 64:b0e0eb595e29 libavformat

* static,const,compiler warning cleanup
author kabi
date Mon, 10 Feb 2003 09:35:32 +0000
parents 8329ba7cbd01
children a58a8a53eb46
files avformat.h aviobuf.c cutils.c framehook.c img.c raw.c rtpproto.c rtsp.c utils.c
diffstat 9 files changed, 22 insertions(+), 25 deletions(-) [+]
line wrap: on
line diff
--- 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;
--- 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 <stdarg.h>
 
 #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);
--- 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++;
--- 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;
--- 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) {
--- 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];
--- 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)
--- 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;
--- 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);