diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2009-02-22 02:06:55 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2009-02-22 02:06:55 +0000 |
commit | d8f28a77270b2d94fea92d56c8737eb626adce8d (patch) | |
tree | 2e8c134fea4ecc9f69dff40429e16f96625c8867 | |
parent | 0047372722fae0f84b116d3ae91c8ab8874e2369 (diff) | |
download | ffmpeg-d8f28a77270b2d94fea92d56c8737eb626adce8d.tar.gz |
add bandwidth before failing if feed is already being received
Originally committed as revision 17516 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | ffserver.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ffserver.c b/ffserver.c index 0c293e6065..4e746cb1af 100644 --- a/ffserver.c +++ b/ffserver.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 (stream->feed_opened) { snprintf(msg, sizeof(msg), "This feed is already being received."); @@ -1362,9 +1365,6 @@ static int http_parse_request(HTTPContext *c) 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) { c->http_error = 200; q = c->buffer; |