Mercurial > libavformat.hg
comparison avio.c @ 2274:b21c2af60bc9 libavformat
Replace all occurrences of AVERROR_IO with AVERROR(EIO).
author | takis |
---|---|
date | Thu, 19 Jul 2007 15:23:32 +0000 |
parents | da71207a7cf1 |
children | 00ffc2f02705 |
comparison
equal
deleted
inserted
replaced
2273:7eb456c4ed8a | 2274:b21c2af60bc9 |
---|---|
99 | 99 |
100 int url_read(URLContext *h, unsigned char *buf, int size) | 100 int url_read(URLContext *h, unsigned char *buf, int size) |
101 { | 101 { |
102 int ret; | 102 int ret; |
103 if (h->flags & URL_WRONLY) | 103 if (h->flags & URL_WRONLY) |
104 return AVERROR_IO; | 104 return AVERROR(EIO); |
105 ret = h->prot->url_read(h, buf, size); | 105 ret = h->prot->url_read(h, buf, size); |
106 return ret; | 106 return ret; |
107 } | 107 } |
108 | 108 |
109 #if defined(CONFIG_MUXERS) || defined(CONFIG_PROTOCOLS) | 109 #if defined(CONFIG_MUXERS) || defined(CONFIG_PROTOCOLS) |
110 int url_write(URLContext *h, unsigned char *buf, int size) | 110 int url_write(URLContext *h, unsigned char *buf, int size) |
111 { | 111 { |
112 int ret; | 112 int ret; |
113 if (!(h->flags & (URL_WRONLY | URL_RDWR))) | 113 if (!(h->flags & (URL_WRONLY | URL_RDWR))) |
114 return AVERROR_IO; | 114 return AVERROR(EIO); |
115 /* avoid sending too big packets */ | 115 /* avoid sending too big packets */ |
116 if (h->max_packet_size && size > h->max_packet_size) | 116 if (h->max_packet_size && size > h->max_packet_size) |
117 return AVERROR_IO; | 117 return AVERROR(EIO); |
118 ret = h->prot->url_write(h, buf, size); | 118 ret = h->prot->url_write(h, buf, size); |
119 return ret; | 119 return ret; |
120 } | 120 } |
121 #endif //CONFIG_MUXERS || CONFIG_PROTOCOLS | 121 #endif //CONFIG_MUXERS || CONFIG_PROTOCOLS |
122 | 122 |