url_add_option(buf, buf_size, "pkt_size=%d", max_packet_size);
if (connect)
url_add_option(buf, buf_size, "connect=1");
- if (sources && sources[0])
- url_add_option(buf, buf_size, "sources=%s", sources);
+ url_add_option(buf, buf_size, "fifo_size=0");
+ if (include_sources && include_sources[0])
+ url_add_option(buf, buf_size, "sources=%s", include_sources);
+ if (exclude_sources && exclude_sources[0])
+ url_add_option(buf, buf_size, "block=%s", exclude_sources);
+ }
+
+ static void rtp_parse_addr_list(URLContext *h, char *buf,
+ struct sockaddr_storage ***address_list_ptr,
+ int *address_list_size_ptr)
+ {
+ struct addrinfo *ai = NULL;
+ struct sockaddr_storage *source_addr;
+ char tmp = '\0', *p = buf, *next;
+
+ /* Resolve all of the IPs */
+
+ while (p && p[0]) {
+ next = strchr(p, ',');
+
+ if (next) {
+ tmp = *next;
+ *next = '\0';
+ }
+
+ ai = rtp_resolve_host(p, 0, SOCK_DGRAM, AF_UNSPEC, 0);
+ if (ai) {
+ source_addr = av_mallocz(sizeof(struct sockaddr_storage));
+ if (!source_addr)
+ break;
+
+ memcpy(source_addr, ai->ai_addr, ai->ai_addrlen);
+ freeaddrinfo(ai);
+ dynarray_add(address_list_ptr, address_list_size_ptr, source_addr);
+ } else {
+ av_log(h, AV_LOG_WARNING, "Unable to resolve %s\n", p);
+ }
+
+ if (next) {
+ *next = tmp;
+ p = next + 1;
+ } else {
+ p = NULL;
+ }
+ }
}
/**