[FFmpeg-cvslog] r23401 - in trunk/libavformat: avio.c avio.h file.c gopher.c http.c librtmp.c rtmpproto.c rtpproto.c tcp.c udp.c
mstorsjo
subversion
Tue Jun 1 09:46:23 CEST 2010
Author: mstorsjo
Date: Tue Jun 1 09:46:23 2010
New Revision: 23401
Log:
Declare the url_write buffer parameter as const
Modified:
trunk/libavformat/avio.c
trunk/libavformat/avio.h
trunk/libavformat/file.c
trunk/libavformat/gopher.c
trunk/libavformat/http.c
trunk/libavformat/librtmp.c
trunk/libavformat/rtmpproto.c
trunk/libavformat/rtpproto.c
trunk/libavformat/tcp.c
trunk/libavformat/udp.c
Modified: trunk/libavformat/avio.c
==============================================================================
--- trunk/libavformat/avio.c Tue Jun 1 08:29:50 2010 (r23400)
+++ trunk/libavformat/avio.c Tue Jun 1 09:46:23 2010 (r23401)
@@ -184,7 +184,7 @@ int url_read_complete(URLContext *h, uns
return len;
}
-int url_write(URLContext *h, unsigned char *buf, int size)
+int url_write(URLContext *h, const unsigned char *buf, int size)
{
int ret;
if (!(h->flags & (URL_WRONLY | URL_RDWR)))
Modified: trunk/libavformat/avio.h
==============================================================================
--- trunk/libavformat/avio.h Tue Jun 1 08:29:50 2010 (r23400)
+++ trunk/libavformat/avio.h Tue Jun 1 09:46:23 2010 (r23401)
@@ -112,7 +112,7 @@ int url_read(URLContext *h, unsigned cha
* certain there was either an error or the end of file was reached.
*/
int url_read_complete(URLContext *h, unsigned char *buf, int size);
-int url_write(URLContext *h, unsigned char *buf, int size);
+int url_write(URLContext *h, const unsigned char *buf, int size);
/**
* Changes the position that will be used by the next read/write
@@ -224,7 +224,7 @@ typedef struct URLProtocol {
const char *name;
int (*url_open)(URLContext *h, const char *url, int flags);
int (*url_read)(URLContext *h, unsigned char *buf, int size);
- int (*url_write)(URLContext *h, unsigned char *buf, int size);
+ int (*url_write)(URLContext *h, const unsigned char *buf, int size);
int64_t (*url_seek)(URLContext *h, int64_t pos, int whence);
int (*url_close)(URLContext *h);
struct URLProtocol *next;
Modified: trunk/libavformat/file.c
==============================================================================
--- trunk/libavformat/file.c Tue Jun 1 08:29:50 2010 (r23400)
+++ trunk/libavformat/file.c Tue Jun 1 09:46:23 2010 (r23401)
@@ -64,7 +64,7 @@ static int file_read(URLContext *h, unsi
return read(fd, buf, size);
}
-static int file_write(URLContext *h, unsigned char *buf, int size)
+static int file_write(URLContext *h, const unsigned char *buf, int size)
{
int fd = (intptr_t) h->priv_data;
return write(fd, buf, size);
Modified: trunk/libavformat/gopher.c
==============================================================================
--- trunk/libavformat/gopher.c Tue Jun 1 08:29:50 2010 (r23400)
+++ trunk/libavformat/gopher.c Tue Jun 1 09:46:23 2010 (r23401)
@@ -31,7 +31,7 @@ typedef struct {
URLContext *hd;
} GopherContext;
-static int gopher_write(URLContext *h, uint8_t *buf, int size)
+static int gopher_write(URLContext *h, const uint8_t *buf, int size)
{
GopherContext *s = h->priv_data;
return url_write(s->hd, buf, size);
Modified: trunk/libavformat/http.c
==============================================================================
--- trunk/libavformat/http.c Tue Jun 1 08:29:50 2010 (r23400)
+++ trunk/libavformat/http.c Tue Jun 1 09:46:23 2010 (r23401)
@@ -49,7 +49,7 @@ typedef struct {
static int http_connect(URLContext *h, const char *path, const char *hoststr,
const char *auth, int *new_location);
-static int http_write(URLContext *h, uint8_t *buf, int size);
+static int http_write(URLContext *h, const uint8_t *buf, int size);
/* return non zero if error */
@@ -358,7 +358,7 @@ static int http_read(URLContext *h, uint
}
/* used only when posting data */
-static int http_write(URLContext *h, uint8_t *buf, int size)
+static int http_write(URLContext *h, const uint8_t *buf, int size)
{
char temp[11]; /* 32-bit hex + CRLF + nul */
int ret;
Modified: trunk/libavformat/librtmp.c
==============================================================================
--- trunk/libavformat/librtmp.c Tue Jun 1 08:29:50 2010 (r23400)
+++ trunk/libavformat/librtmp.c Tue Jun 1 09:46:23 2010 (r23401)
@@ -109,7 +109,7 @@ fail:
return rc;
}
-static int rtmp_write(URLContext *s, uint8_t *buf, int size)
+static int rtmp_write(URLContext *s, const uint8_t *buf, int size)
{
RTMP *r = s->priv_data;
Modified: trunk/libavformat/rtmpproto.c
==============================================================================
--- trunk/libavformat/rtmpproto.c Tue Jun 1 08:29:50 2010 (r23400)
+++ trunk/libavformat/rtmpproto.c Tue Jun 1 09:46:23 2010 (r23401)
@@ -922,7 +922,7 @@ static int rtmp_read(URLContext *s, uint
return orig_size;
}
-static int rtmp_write(URLContext *h, uint8_t *buf, int size)
+static int rtmp_write(URLContext *h, const uint8_t *buf, int size)
{
RTMPContext *rt = h->priv_data;
int size_temp = size;
Modified: trunk/libavformat/rtpproto.c
==============================================================================
--- trunk/libavformat/rtpproto.c Tue Jun 1 08:29:50 2010 (r23400)
+++ trunk/libavformat/rtpproto.c Tue Jun 1 09:46:23 2010 (r23401)
@@ -279,7 +279,7 @@ static int rtp_read(URLContext *h, uint8
return len;
}
-static int rtp_write(URLContext *h, uint8_t *buf, int size)
+static int rtp_write(URLContext *h, const uint8_t *buf, int size)
{
RTPContext *s = h->priv_data;
int ret;
Modified: trunk/libavformat/tcp.c
==============================================================================
--- trunk/libavformat/tcp.c Tue Jun 1 08:29:50 2010 (r23400)
+++ trunk/libavformat/tcp.c Tue Jun 1 09:46:23 2010 (r23401)
@@ -154,7 +154,7 @@ static int tcp_read(URLContext *h, uint8
}
}
-static int tcp_write(URLContext *h, uint8_t *buf, int size)
+static int tcp_write(URLContext *h, const uint8_t *buf, int size)
{
TCPContext *s = h->priv_data;
int ret, size1, fd_max, len;
Modified: trunk/libavformat/udp.c
==============================================================================
--- trunk/libavformat/udp.c Tue Jun 1 08:29:50 2010 (r23400)
+++ trunk/libavformat/udp.c Tue Jun 1 09:46:23 2010 (r23401)
@@ -456,7 +456,7 @@ static int udp_read(URLContext *h, uint8
return len;
}
-static int udp_write(URLContext *h, uint8_t *buf, int size)
+static int udp_write(URLContext *h, const uint8_t *buf, int size)
{
UDPContext *s = h->priv_data;
int ret;
More information about the ffmpeg-cvslog
mailing list