summaryrefslogtreecommitdiff
path: root/libavformat/avio.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2011-04-04 20:11:19 +0200
committerAnton Khirnov <anton@khirnov.net>2011-04-07 18:07:16 +0200
commitf87b1b373a0df55080c1e6a5874f9a0a75c6fee8 (patch)
tree9b44dffc615a4832c3d67cc27a6eb13ca8960df1 /libavformat/avio.c
parent3d42d4937b029b604da7d53dce16c72e8edde29c (diff)
avio: AVIO_ prefixes for URL_ open flags.
Diffstat (limited to 'libavformat/avio.c')
-rw-r--r--libavformat/avio.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libavformat/avio.c b/libavformat/avio.c
index 976499ff14..8c53e5cd36 100644
--- a/libavformat/avio.c
+++ b/libavformat/avio.c
@@ -144,7 +144,7 @@ int ffurl_connect(URLContext* uc)
return err;
uc->is_connected = 1;
//We must be careful here as ffurl_seek() could be slow, for example for http
- if( (uc->flags & (URL_WRONLY | URL_RDWR))
+ if( (uc->flags & (AVIO_WRONLY | AVIO_RDWR))
|| !strcmp(uc->prot->name, "file"))
if(!uc->is_streamed && ffurl_seek(uc, 0, SEEK_SET) < 0)
uc->is_streamed= 1;
@@ -275,7 +275,7 @@ static inline int retry_transfer_wrapper(URLContext *h, unsigned char *buf, int
ret = transfer_func(h, buf+len, size-len);
if (ret == AVERROR(EINTR))
continue;
- if (h->flags & URL_FLAG_NONBLOCK)
+ if (h->flags & AVIO_FLAG_NONBLOCK)
return ret;
if (ret == AVERROR(EAGAIN)) {
ret = 0;
@@ -296,21 +296,21 @@ static inline int retry_transfer_wrapper(URLContext *h, unsigned char *buf, int
int ffurl_read(URLContext *h, unsigned char *buf, int size)
{
- if (h->flags & URL_WRONLY)
+ if (h->flags & AVIO_WRONLY)
return AVERROR(EIO);
return retry_transfer_wrapper(h, buf, size, 1, h->prot->url_read);
}
int ffurl_read_complete(URLContext *h, unsigned char *buf, int size)
{
- if (h->flags & URL_WRONLY)
+ if (h->flags & AVIO_WRONLY)
return AVERROR(EIO);
return retry_transfer_wrapper(h, buf, size, size, h->prot->url_read);
}
int ffurl_write(URLContext *h, const unsigned char *buf, int size)
{
- if (!(h->flags & (URL_WRONLY | URL_RDWR)))
+ if (!(h->flags & (AVIO_WRONLY | AVIO_RDWR)))
return AVERROR(EIO);
/* avoid sending too big packets */
if (h->max_packet_size && size > h->max_packet_size)
@@ -348,7 +348,7 @@ int ffurl_close(URLContext *h)
int url_exist(const char *filename)
{
URLContext *h;
- if (ffurl_open(&h, filename, URL_RDONLY) < 0)
+ if (ffurl_open(&h, filename, AVIO_RDONLY) < 0)
return 0;
ffurl_close(h);
return 1;