#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>
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;
}
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;
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);