[Ffmpeg-cvslog] CVS: ffmpeg ffserver.c,1.99,1.100

Alex Beregszaszi alex
Sun Nov 13 04:26:45 CET 2005


Update of /cvsroot/ffmpeg/ffmpeg
In directory mail:/var2/tmp/cvs-serv25706

Modified Files:
	ffserver.c 
Log Message:
support for unlimited feed size

Index: ffserver.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/ffserver.c,v
retrieving revision 1.99
retrieving revision 1.100
diff -u -d -r1.99 -r1.100
--- ffserver.c	13 Nov 2005 03:12:14 -0000	1.99
+++ ffserver.c	13 Nov 2005 03:26:43 -0000	1.100
@@ -218,7 +218,7 @@
     int readonly;        /* True if writing is prohibited to the file */
     int conns_served;
     int64_t bytes_served;
-    int64_t feed_max_size;      /* maximum storage size */
+    int64_t feed_max_size;      /* maximum storage size, zero means unlimited */
     int64_t feed_write_index;   /* current write position in feed (it wraps round) */
     int64_t feed_size;          /* current size of feed */
     struct FFStream *next_feed;
@@ -2417,7 +2417,7 @@
                 feed->feed_size = feed->feed_write_index;
 
             /* handle wrap around if max file size reached */
-            if (feed->feed_write_index >= c->stream->feed_max_size)
+            if (c->stream->feed_max_size && feed->feed_write_index >= c->stream->feed_max_size)
                 feed->feed_write_index = FFM_PACKET_SIZE;
 
             /* write index */
@@ -3539,7 +3539,7 @@
         feed->feed_write_index = ffm_read_write_index(fd);
         feed->feed_size = lseek(fd, 0, SEEK_END);
         /* ensure that we do not wrap before the end of file */
-        if (feed->feed_max_size < feed->feed_size)
+        if (feed->feed_max_size && feed->feed_max_size < feed->feed_size)
             feed->feed_max_size = feed->feed_size;
 
         close(fd);





More information about the ffmpeg-cvslog mailing list