X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=ffserver.c;h=d02b4d057c3135994af534eeeb173220b56d6872;hb=2014b51caee15069ae50cf4151f694ffadb4b7ba;hp=cdfb277e5cca9e380602dbe30004481a14b6e92f;hpb=90abbdba1e7f9df2c32bdb0a9b7c68297cd135c8;p=ffmpeg diff --git a/ffserver.c b/ffserver.c index cdfb277e5cc..d02b4d057c3 100644 --- a/ffserver.c +++ b/ffserver.c @@ -567,7 +567,7 @@ static int http_server(void) return -1; } - http_log("ffserver started.\n"); + http_log("FFserver started.\n"); start_children(first_feed); @@ -1341,7 +1341,7 @@ static int http_parse_request(HTTPContext *c) /* If this is WMP, get the rate information */ if (extract_rates(ratebuf, sizeof(ratebuf), c->buffer)) { if (modify_current_stream(c, ratebuf)) { - for (i = 0; i < sizeof(c->feed_streams) / sizeof(c->feed_streams[0]); i++) { + for (i = 0; i < FF_ARRAY_ELEMS(c->feed_streams); i++) { if (c->switch_feed_streams[i] >= 0) do_switch_stream(c, i); } @@ -1367,8 +1367,8 @@ static int http_parse_request(HTTPContext *c) "\r\n" "Too busy\r\n" "

The server is too busy to serve your request at this time.

\r\n" - "

The bandwidth being served (including your stream) is %" PRIu64 "kbit/sec, " - "and this exceeds the limit of %" PRIu64 "kbit/sec.

\r\n" + "

The bandwidth being served (including your stream) is %"PRIu64"kbit/sec, " + "and this exceeds the limit of %"PRIu64"kbit/sec.

\r\n" "\r\n", current_bandwidth, max_bandwidth); /* prepare output buffer */ c->buffer_ptr = c->buffer; @@ -1860,7 +1860,7 @@ static void compute_status(HTTPContext *c) url_fprintf(pb, "Number of connections: %d / %d
\n", nb_connections, nb_max_connections); - url_fprintf(pb, "Bandwidth in use: %" PRIu64 "k / %" PRIu64 "k
\n", + url_fprintf(pb, "Bandwidth in use: %"PRIu64"k / %"PRIu64"k
\n", current_bandwidth, max_bandwidth); url_fprintf(pb, "\n"); @@ -4018,10 +4018,12 @@ static int parse_ffconfig(const char *filename) } } else if (!strcasecmp(cmd, "InputFormat")) { get_arg(arg, sizeof(arg), &p); - stream->ifmt = av_find_input_format(arg); - if (!stream->ifmt) { - fprintf(stderr, "%s:%d: Unknown input format: %s\n", - filename, line_num, arg); + if (stream) { + stream->ifmt = av_find_input_format(arg); + if (!stream->ifmt) { + fprintf(stderr, "%s:%d: Unknown input format: %s\n", + filename, line_num, arg); + } } } else if (!strcasecmp(cmd, "FaviconURL")) { if (stream && stream->stream_type == STREAM_TYPE_STATUS) {