Commit 18142a97 authored by bcoudurier's avatar bcoudurier

add bandwidth before failing if feed is already being received

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@17516 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent ceed1020
...@@ -1355,6 +1355,9 @@ static int http_parse_request(HTTPContext *c) ...@@ -1355,6 +1355,9 @@ static int http_parse_request(HTTPContext *c)
} }
} }
if (c->post == 0 && stream->stream_type == STREAM_TYPE_LIVE)
current_bandwidth += stream->bandwidth;
/* If already streaming this feed, do not let start another feeder. */ /* If already streaming this feed, do not let start another feeder. */
if (stream->feed_opened) { if (stream->feed_opened) {
snprintf(msg, sizeof(msg), "This feed is already being received."); snprintf(msg, sizeof(msg), "This feed is already being received.");
...@@ -1362,9 +1365,6 @@ static int http_parse_request(HTTPContext *c) ...@@ -1362,9 +1365,6 @@ static int http_parse_request(HTTPContext *c)
goto send_error; goto send_error;
} }
if (c->post == 0 && stream->stream_type == STREAM_TYPE_LIVE)
current_bandwidth += stream->bandwidth;
if (c->post == 0 && max_bandwidth < current_bandwidth) { if (c->post == 0 && max_bandwidth < current_bandwidth) {
c->http_error = 200; c->http_error = 200;
q = c->buffer; q = c->buffer;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment