if feeder is disconnected, clear the feed registration, thus a new feeder can connect
authorAlex Beregszaszi <alex@rtfs.hu>
Thu, 22 Feb 2007 13:27:39 +0000 (13:27 +0000)
committerAlex Beregszaszi <alex@rtfs.hu>
Thu, 22 Feb 2007 13:27:39 +0000 (13:27 +0000)
Originally committed as revision 8072 to svn://svn.ffmpeg.org/ffmpeg/trunk

ffserver.c

index 94751e7db77c162c77508b584d62b152bb5bbd29..ba87f3598b675274618344ae16e2e304acace934 100644 (file)
@@ -762,6 +762,13 @@ static void close_connection(HTTPContext *c)
 
     if (c->stream && !c->post && c->stream->stream_type == STREAM_TYPE_LIVE)
         current_bandwidth -= c->stream->bandwidth;
+
+    /* signal that there is no feed if we are the feeder socket */
+    if (c->state == HTTPSTATE_RECEIVE_DATA && c->stream) {
+        c->stream->feed_opened = 0;
+        close(c->feed_fd);
+    }
+
     av_freep(&c->pb_buffer);
     av_freep(&c->packet_buffer);
     av_free(c->buffer);