X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=ffserver.c;h=4c34cc9da0a18555ea3801f68fd07a78531c9458;hb=9e0a1bd2b977e69638a691e4ff4c9ceb21d45c33;hp=0946d0e392808793ffea6d54de8cdb3640f23441;hpb=3e2714992b5023260ebfafd5d8f7d4cd0e2bdd80;p=ffmpeg diff --git a/ffserver.c b/ffserver.c index 0946d0e3928..4c34cc9da0a 100644 --- a/ffserver.c +++ b/ffserver.c @@ -209,10 +209,10 @@ static void close_connection(HTTPContext *c); /* HTTP handling */ static int handle_connection(HTTPContext *c); -static int http_parse_request(HTTPContext *c); -static int http_send_data(HTTPContext *c); static void compute_status(HTTPContext *c); static int open_input_stream(HTTPContext *c, const char *info); +static int http_parse_request(HTTPContext *c); +static int http_send_data(HTTPContext *c); static int http_start_receive_data(HTTPContext *c); static int http_receive_data(HTTPContext *c); @@ -465,7 +465,8 @@ static int socket_open_listen(struct sockaddr_in *my_addr) my_addr->sin_family = AF_INET; if (bind (server_fd, (struct sockaddr *) my_addr, sizeof (*my_addr)) < 0) { char bindmsg[32]; - snprintf(bindmsg, sizeof(bindmsg), "bind(port %d)", ntohs(my_addr->sin_port)); + snprintf(bindmsg, sizeof(bindmsg), "bind(port %d)", + ntohs(my_addr->sin_port)); perror (bindmsg); closesocket(server_fd); return -1; @@ -725,7 +726,8 @@ static void http_send_too_busy_reply(int fd) nb_connections, config.nb_max_connections); av_assert0(len < sizeof(buffer)); if (send(fd, buffer, len, 0) < len) - av_log(NULL, AV_LOG_WARNING, "Could not send too-busy reply, send() failed\n"); + av_log(NULL, AV_LOG_WARNING, + "Could not send too-busy reply, send() failed\n"); } @@ -1091,7 +1093,8 @@ static int extract_rates(char *rates, int ratelen, const char *request) return 0; } -static int find_stream_in_feed(FFServerStream *feed, AVCodecContext *codec, int bit_rate) +static int find_stream_in_feed(FFServerStream *feed, AVCodecContext *codec, + int bit_rate) { int i; int best_bitrate = 100000000; @@ -1113,7 +1116,8 @@ static int find_stream_in_feed(FFServerStream *feed, AVCodecContext *codec, int */ if (feed_codec->bit_rate <= bit_rate) { - if (best_bitrate > bit_rate || feed_codec->bit_rate > best_bitrate) { + if (best_bitrate > bit_rate || + feed_codec->bit_rate > best_bitrate) { best_bitrate = feed_codec->bit_rate; best = i; } @@ -1183,7 +1187,8 @@ static void get_word(char *buf, int buf_size, const char **pp) *pp = p; } -static FFServerIPAddressACL* parse_dynamic_acl(FFServerStream *stream, HTTPContext *c) +static FFServerIPAddressACL* parse_dynamic_acl(FFServerStream *stream, + HTTPContext *c) { FILE* f; char line[1024]; @@ -1211,7 +1216,8 @@ static FFServerIPAddressACL* parse_dynamic_acl(FFServerStream *stream, HTTPConte ffserver_get_arg(cmd, sizeof(cmd), &p); if (!av_strcasecmp(cmd, "ACL")) - ffserver_parse_acl_row(NULL, NULL, acl, p, stream->dynamic_acl, line_num); + ffserver_parse_acl_row(NULL, NULL, acl, p, stream->dynamic_acl, + line_num); } fclose(f); return acl; @@ -1339,7 +1345,8 @@ static int http_parse_request(HTTPContext *c) av_strlcpy(c->protocol, protocol, sizeof(c->protocol)); if (config.debug) - http_log("%s - - New connection: %s %s\n", inet_ntoa(c->from_addr.sin_addr), cmd, url); + http_log("%s - - New connection: %s %s\n", + inet_ntoa(c->from_addr.sin_addr), cmd, url); /* find the filename and the optional info string in the request */ p1 = strchr(url, '?'); @@ -1414,7 +1421,8 @@ static int http_parse_request(HTTPContext *c) "\r\n" "