Browse Source

add bandwidth before failing if feed is already being received

Originally committed as revision 17516 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Baptiste Coudurier 16 years ago
parent
commit
d8f28a7727
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      ffserver.c

+ 3
- 3
ffserver.c View File

@@ -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;


Loading…
Cancel
Save