comparison avio.c @ 905:dbc0145bbf11 libavformat

Add --disable-protocols option to configure to disable I/O protocol from libavformat. Also fix build with --disable-muxers and --disable-ffserver. patch by Gildas Bazin < gbazin **@** altern **.** org >
author diego
date Sat, 21 Jan 2006 18:36:32 +0000
parents edbe5c3717f9
children 0899bfe4105c
comparison
equal deleted inserted replaced
904:5d3dc3a6bbe7 905:dbc0145bbf11
98 return AVERROR_IO; 98 return AVERROR_IO;
99 ret = h->prot->url_read(h, buf, size); 99 ret = h->prot->url_read(h, buf, size);
100 return ret; 100 return ret;
101 } 101 }
102 102
103 #ifdef CONFIG_MUXERS 103 #if defined(CONFIG_MUXERS) || defined(CONFIG_PROTOCOLS)
104 int url_write(URLContext *h, unsigned char *buf, int size) 104 int url_write(URLContext *h, unsigned char *buf, int size)
105 { 105 {
106 int ret; 106 int ret;
107 if (!(h->flags & (URL_WRONLY | URL_RDWR))) 107 if (!(h->flags & (URL_WRONLY | URL_RDWR)))
108 return AVERROR_IO; 108 return AVERROR_IO;
110 if (h->max_packet_size && size > h->max_packet_size) 110 if (h->max_packet_size && size > h->max_packet_size)
111 return AVERROR_IO; 111 return AVERROR_IO;
112 ret = h->prot->url_write(h, buf, size); 112 ret = h->prot->url_write(h, buf, size);
113 return ret; 113 return ret;
114 } 114 }
115 #endif //CONFIG_MUXERS 115 #endif //CONFIG_MUXERS || CONFIG_PROTOCOLS
116 116
117 offset_t url_seek(URLContext *h, offset_t pos, int whence) 117 offset_t url_seek(URLContext *h, offset_t pos, int whence)
118 { 118 {
119 offset_t ret; 119 offset_t ret;
120 120