#include <sys/poll.h>
#include <errno.h>
#include <sys/time.h>
+#undef time //needed because HAVE_AV_CONFIG_H is defined on top
#include <time.h>
#include <sys/types.h>
#include <sys/socket.h>
second to handle timeouts */
do {
ret = poll(poll_table, poll_entry - poll_table, delay);
- } while (ret == -1);
+ if (ret < 0 && errno != EAGAIN && errno != EINTR)
+ return -1;
+ } while (ret <= 0);
cur_time = gettime_ms();
if (eol) {
if (eol[-1] == '\r')
eol--;
- http_log("%.*s\n", eol - logline, logline);
+ http_log("%.*s\n", (int) (eol - logline), logline);
c->suppress_log = 1;
}
}
/* XXX: potential leak */
return -1;
}
- if (av_write_frame(ctx, pkt.stream_index, pkt.data, pkt.size)) {
+ if (av_write_frame(ctx, &pkt)) {
c->state = HTTPSTATE_SEND_DATA_TRAILER;
}
struct sockaddr_in my_addr;
/* find which url is asked */
- url_split(NULL, 0, NULL, 0, NULL, path1, sizeof(path1), url);
+ url_split(NULL, 0, NULL, 0, NULL, 0, NULL, path1, sizeof(path1), url);
path = path1;
if (*path == '/')
path++;
RTSPActionServerSetup setup;
/* find which url is asked */
- url_split(NULL, 0, NULL, 0, NULL, path1, sizeof(path1), url);
+ url_split(NULL, 0, NULL, 0, NULL, 0, NULL, path1, sizeof(path1), url);
path = path1;
if (*path == '/')
path++;
return NULL;
/* find which url is asked */
- url_split(NULL, 0, NULL, 0, NULL, path1, sizeof(path1), url);
+ url_split(NULL, 0, NULL, 0, NULL, 0, NULL, path1, sizeof(path1), url);
path = path1;
if (*path == '/')
path++;
int max_packet_size;
/* now we can open the relevant output stream */
- ctx = av_mallocz(sizeof(AVFormatContext));
+ ctx = av_alloc_format_context();
if (!ctx)
return -1;
ctx->oformat = &rtp_mux;
av->b_quant_factor = 1.25;
if (!av->b_quant_offset)
av->b_quant_offset = 1.25;
- if (!av->rc_min_rate)
- av->rc_min_rate = av->bit_rate / 2;
if (!av->rc_max_rate)
av->rc_max_rate = av->bit_rate * 2;
errors++;
}
}
+ } else if (!strcasecmp(cmd, "VideoBufferSize")) {
+ if (stream) {
+ get_arg(arg, sizeof(arg), &p);
+ video_enc.rc_buffer_size = atoi(arg) * 1024;
+ }
} else if (!strcasecmp(cmd, "VideoBitRateTolerance")) {
if (stream) {
get_arg(arg, sizeof(arg), &p);