check if feed max file size is too small
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>
Sat, 21 Mar 2009 10:32:43 +0000 (10:32 +0000)
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>
Sat, 21 Mar 2009 10:32:43 +0000 (10:32 +0000)
Originally committed as revision 18109 to svn://svn.ffmpeg.org/ffmpeg/trunk

ffserver.c

index 8d77b94..61ecf20 100644 (file)
@@ -3987,6 +3987,11 @@ static int parse_ffconfig(const char *filename)
                     break;
                 }
                 feed->feed_max_size = (int64_t)fsize;
+                if (feed->feed_max_size < FFM_PACKET_SIZE*4) {
+                    fprintf(stderr, "%s:%d: Feed max file size is too small, "
+                            "must be at least %d\n", filename, line_num, FFM_PACKET_SIZE*4);
+                    errors++;
+                }
             }
         } else if (!strcasecmp(cmd, "</Feed>")) {
             if (!feed) {